Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: need a clearer understanding

by Utilitarian (Vicar)
on Aug 10, 2011 at 09:16 UTC ( #919622=note: print w/replies, xml ) Need Help??

in reply to need a clearer understanding

I suspect that your failure to put the code in your question in a code block is the reason people are finding you hard to answer.
if($tmp[0] eq ">") { my $nm = substr($line,1); $nm = $nm . $tot; $tot++; $line = <$IFH>; #IS THIS THE LINE YOU MEANT ? chomp $line; $ret{$nm} = $line; }
If my guess is correct it means exactly the same as the same code in the while ($line = <$IFH>){ line that surrounds the read.

It reads the next line into the $line variable (If not end of file) within a block which is only run if the previous line began with a ">" character.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919622]
vrk takes a cookie from the platter on the sideboard.
Eily thinks vrk is a cookie monster
talexb thinks the term 'cookie monster' is unnecessarily drogatory ;) and takes a cookie as well. Mmmm. Delicious cookies.
[davido]: A tool as pretentious as Test::Perl::Critic ought not fail to install because one of its dependencies failed to pull in List::MoreUtils.
[davido]: ...and

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2017-04-25 16:00 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (458 votes). Check out past polls.