Using $_ worked for me in my application. I replaced variable $nextline with $_, so that the inner "while" works with $_ until the condition and $line will continue from where $_ left ( i.e. file handler). Thanks once again guyz. take care and have funwhile($line=<FH>) { print "$line \n"; while(<FH>) { print "Next line is $_ \n"; } }
In reply to Re^2: reading lines from a text file
by misba
in thread reading lines from a text file
by misba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |