If you expected that the contents of the data file would be read into the @lines array, the second line should be:open my $in_fh, '<',$file; my @lines = $file; close $in_fh;
The way you posted it, you're just assigning the file name (value of $file) to be the first element of @lines, and nothing else is placed into the array. That's why you got "use of uninitialized value" when you tried to do something with the second element of the array.my @lines = <$in_fh>;
In reply to Re^3: Have a multiple file in directory and want to manipulate in each files in incremental order. All the file have same value.
by graff
in thread Have a multiple file in directory and want to manipulate in each files in incremental order. All the file have same value.
by hemantjsr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |