I've ran into so many problems copying files (esp during a 'make') that I now do the equivalent of the following for each executable ...
rm -f dest
cp src dest
chmod ugo+rx dest
Which handles cases where dest already exists, src and/or dest are owned by someone else and may already have wrong permissions set, or dest is already in use (and some OSs complain if you try to overwrite it). This isn't perfect (esp for NFS) so YMMV.
The problem I have with using pure perl to replace common Unix commands is that I need to spend the time and test to make sure my assumptions are correct about how they work and I need to be able to spend the time to pursue a fix/workaround if they don't work like I expect. If the module is not in Perl's core I need to go to additional trouble (e.g. Do I really want to spend the effort on a module at version 0.01 which hasn't been upgraded in 3 years?).
bluto
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|