in reply to Re^2: Have a multiple file in directory and want to manipulate in each files in incremental order. All the file have same value.
in thread Have a multiple file in directory and want to manipulate in each files in incremental order. All the file have same value.

What did you expect to happen as a result of these lines?
open my $in_fh, '<',$file; my @lines = $file; close $in_fh;
If you expected that the contents of the data file would be read into the @lines array, the second line should be:
my @lines = <$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.
  • Comment on Re^3: Have a multiple file in directory and want to manipulate in each files in incremental order. All the file have same value.
  • Select or Download Code