![]() |
Re: basic perl question
vis29 <dviswa@gmail.com> 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 |
| All times are GMT. The time now is 06:54 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.