in reply to Doesn't like a Scalar, as a folder path

Hi,

you will probably have a CR/LF at the end of your filename. You have to do a chomp $lines to get rid of it.

McA

Replies are listed 'Best First'.
Re^2: Doesn't like a Scalar, as a folder path
by ArifS (Beadle) on Oct 27, 2014 at 18:55 UTC
    good call. Totally forgot about that. Thanks.

      This is such a common error case that Perl even outputs a warning for it if you let it. Put use warnings; at the top of your program to tell Perl that you want it to tell you about common programming errors that it can recognize.