<html>
<body>
I knew there had to be a reason!<br><br>
At 2004/02/26 09:06 AM, Oskar Pearson wrote:<br>
<blockquote type=cite class=cite cite>Hi<br><br>
<br>
&gt; Why use move - couldn't you just use rename
(&quot;/tmp/balsa.tmp&quot;, $file )?<br><br>
<br>
Check out &quot;man perlfunc&quot;. The &quot;move&quot; command will
work across<br>
different mount points (so that if your /tmp directory is<br>
on a different filesystem to the files you are manipulating,<br>
it will still work in all cases on all systems).<br><br>
rename OLDNAME,NEWNAME<br>
Changes the name of a file; an existing file NEWNAME will<br>
be clobbered.&nbsp; Returns true for success, false other­ 
wise.<br><br>
Behavior of this function varies wildly depending on your<br>
system implementation.&nbsp; For example, it will usually not<br>
work across file system boundaries, even though the system mv<br>
command sometimes compensates for this.&nbsp; Other restrictions<br>
include whether it works on directories, open files, or<br>
pre-existing files.&nbsp; Check perlport and either the rename(2)<br>
manpage or equivalent system documentation for details.<br><br>
<br>
&gt; At 2004/02/26 06:12 AM, Nico Coetzee wrote:<br>
&gt; &gt;# but first make a backup copy:<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;
43&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $bakfile=
$file . &quot;.bak&quot;;<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;
44&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rename( $file,
$bakfile );<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;
45&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move(
&quot;/tmp/balsa.tmp&quot;, $file );<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;
46&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if( -e $file )
{<br>
&gt; &gt;&nbsp;&nbsp;&nbsp; 47<br>
_______________________________________________<br>
Za-pm mailing list<br>
Za-pm@mail.pm.org<br>
<a href="http://mail.pm.org/mailman/listinfo/za-pm" eudora="autourl">http://mail.pm.org/mailman/listinfo/za-pm</a>
</blockquote>
<x-sigsep><p></x-sigsep>
<tt><br>
<font face="Courier New, Courier" size=2>Spike Hodge<br><br>
</font></tt><font face="Courier New, Courier">UNIX Programmer<br>
M-Web Technology<br>
021 596 8496<br>
083 294 9593<br>
Fax 0866721733<br><br>
<br>
</font>Click here and make M-Web your homepage<br>
<a href="http://homepage.mweb.co.za/" eudora="autourl">http://homepage.mweb.co.za</a> </body>
</html>