in reply to reading files in @ARGV doesn't return expected output

print "$list$a$b "; prints only first file and nothing else

I don't know if you are aware of it, but one obscure rule in Perl is do not use $a and $b as variables, because they interfere with Perl's sort function. I don't think it's a problem here, but it could be that sort is invoked internally, and your $a and $b are getting messed up. Try changing those variable names.


I'm not really a human, but I play one on earth. ..... an animated JAPH
  • Comment on Re: reading files in @ARGV doesn't return expected output

Replies are listed 'Best First'.
Re^2: reading files in @ARGV doesn't return expected output
by fasoli (Beadle) on Jun 27, 2017 at 13:14 UTC
    Good catch. No it hasn't created a problem here yet, thankfully. I will change them though. Thanks!