I really started counting the lines till 35 before I saw your comment.
something like:
$line = <FILE>; # <---------- 35 # this line doesn't work. don't know what's wrong here..
is easier to find.
anyway, you did it twice:
@buf = <FILE>; # you reading all lines of FILE i +nto @buf foreach $line (@buf) { # OK! (well, "my $line" would be +better) $line = <FILE>; # but now reading again a single +line !?! # which is undef after EOF
please less cargo cult programming!
Don't c&p different approaches from other snippets, better try to understand what's happening.
Cheers Rolf
In reply to Re: process a file and reading a line and passing the values to another sub function
by LanX
in thread process a file and reading a line and passing the values to another sub function
by Vijay81
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |