For the platofrm generic way, I would direct your attention
to the core module File::Copy.
From the perldoc pages, I quote
If possible, move() will simply rename the file.
Otherwise, it copies the file to the new location and
deletes the original. If an error occurs during this
copy-and-delete process, you may be left with a
(possibly partial) copy of the file under the
destination name.
which seems to handle both the platform dependant issues as
well as the the question jrsmith asked.
Mik
Mik Firestone ( perlus bigotus maximus ) |