in reply to anonymous file handler objects

IO::File->new('<$file')

Do you really have a file name $file, literally?

Replies are listed 'Best First'.
Re^2: anonymous file handler objects
by roadtest (Sexton) on Dec 03, 2010 at 15:06 UTC
    Yes, I have many market related *.input files under one directory. Try to use perl to back them up.

    Thanks,

        That is the problem. I decide using "rename" function instead of file handler:-) Thanks!
      Update - sorry, forgot to hit "Create" and moritz had already backed up their original response with what I wrote below - feel free to ignore or delete!

      As moritz was pointing out, using the single quotes as in '<$file' would NOT interpolate, and would only work if you actually had a file called $file.
        That is the problem and I decide using rename instead of anonymous file handler array:-)

        Thanks for your time and have a good weekend!