Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Re: basic perl question

Reply
Thread Tools

Re: basic perl question

 
 
Jürgen Exner
Guest
Posts: n/a
 
      10-30-2012
vis29 <(E-Mail Removed)> wrote:
>I am going through a perl program, i have following lines which I dont understand, please explain what those lines does and why.
>
>if (/^$hash{server}/) {
> $name="not accessible";
> }


It tests if the value in $_ (which is the default if no other value is
specified) matches the regular expression between the /.../, which in
turn specifies that the string should begin with whatever value the
element "server" in the hash %hash currently has.
If a match is found, then it assigns the text "not accessible" to the
variable $name.

jue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TurboTax Basic vs. Taxcut Basic? Sharp Dressed Man Computer Support 1 01-12-2009 12:52 PM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Re: Python interpreter in Basic or a Python-2-Basic translator. rrr@ronadam.com Python 0 05-02-2005 01:48 PM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments