$.02open (IN,"<" . "c:/tmp.txt") or die "Doh: $!"; # Use ()'s, and added o +r die... sometimes that comes in hand when debugging. while(<IN>){ # $_ is set to each line for each file. my $line = $_; # Take raw form of line $line =~ chomp $line; # chomp the line. if (length($line)){ # does line have non zero length? (Sorta what y +ou're doing.) print "$line\n"; } } close IN; # Clean up.
In reply to Re: WHILE and DEFINED problem
by zakzebrowski
in thread WHILE and DEFINED problem
by eldinkim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |