open my $fh, "test.txt" or die $!; while(<$fh>) { print "$.:$_"; } __END__ outputs: 1:First line 2:Second line 3:Third line 4:Fourth line
In reply to Re: Line number problem with foreach
by bruno
in thread Line number problem with foreach
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |