Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: need a clearer understanding

by parv (Priest)
on Aug 09, 2011 at 19:20 UTC ( #919525=note: print w/replies, xml ) Need Help??


in reply to need a clearer understanding

... while($line = <$IFH> ){ chomp $line; if(not($line eq "")) { ##### why does $line equal "" ? my @tmp = split(//,$line); ...

what does $line = ""; mean?

If the "#####" comment is anything to go by, then a test for "not empty line" is being done in "not( $line eq "" )".

In that case your question is actually different than the comment, where you assign an empty string to $line variable.

Replies are listed 'Best First'.
Re^2: need a clearer understanding
by duyet (Pilgrim) on Aug 09, 2011 at 19:51 UTC
    I think he means ($line eq "")

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://919525]
help
Chatterbox?
[ambrus]: Corion, moritz: haha. I moved to different rooms like eight times in the five year's working here so far.
[ambrus]: Discipulus: ouch
[Discipulus]: eh, at the end i cannot compete with brother choroba, i just profited he is at lunch
[pra]: What is the best way to determine if a given string is a valid color?
[Discipulus]: context pra? tk html console naturla language?
[Corion]: Or HTML color like #c0ffee ?
[pra]: Perl/Tk. I want to input a file that will contain color names, but users might not know what names are valid

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2017-10-17 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (226 votes). Check out past polls.

    Notices?