in reply to Re^2: A DWIM too far?
in thread A DWIM too far?
As is, the behaviour makes it impossible to safely rename a file.It makes it harder, at least:
I can't recall how to do this to the CORE, perhaps someone will remind me?sub myrename { my $rename = ( $^O eq 'MSWin32' ) ? 'move -y' : 'mv -i'; `$rename @_[0,1]`; return $!; } myrename('abc','def') or die $!;
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A DWIM too far?
by ihb (Deacon) on Jun 18, 2004 at 02:22 UTC | |
by QM (Parson) on Jun 18, 2004 at 15:52 UTC | |
by eric256 (Parson) on Jun 18, 2004 at 16:04 UTC | |
by QM (Parson) on Jun 18, 2004 at 18:48 UTC | |
by BrowserUk (Patriarch) on Jun 18, 2004 at 19:35 UTC | |
|
Re^4: A DWIM too far?
by BrowserUk (Patriarch) on Jun 18, 2004 at 01:40 UTC | |
by QM (Parson) on Jun 18, 2004 at 01:44 UTC | |
by BrowserUk (Patriarch) on Jun 18, 2004 at 02:01 UTC |