in reply to Moving a Text File

Learning Perl on Win32 Systems!

Chapter 13 on File and Directory Manipulation

More specifically : rename("fred","barney") || die "Can't rename fred to barney: $!";
Even more specifically : rename("file","some-directory/file");

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?

Replies are listed 'Best First'.
(tye)Re2: Moving a Text File
by tye (Sage) on May 17, 2001 at 18:46 UTC

    FYI, that won't work in this case since rename() usually doesn't work across file systems (and Win32 isn't an exception), and the original code was trying to go across file systems.

            - tye (but my friends call me "Tye")