in reply to uninitialized value in concatenation (.)
As for the second error (readline() on unopened filehandle at ... line 57) I would guess that line 57 is this one:# like this: (my $newfile = $filename ) =~ s{.*[\\/]}{}; # if there is no (back)slash, $newfile will be same as $filename # or like this: my @path = split /[\/\\]/, $filename; my $newfile = pop @path; # or use File::Basename, if that's appropriate to your needs
You are supposed to put an open file handle inside the "diamond" operator -- not a scalar string that holds the file name. Do something like this instead:while(<$filename>) {
open( IN, $filename ) or die "$filename: $!"; while (<IN>) {
|
|---|