As the (yet non-official) maintainer of Shell as a CPAN distribution, I would like to defend there are good uses for Shell. But this does not seem one of them: all of the external programs you are calling have Perl builtins or core libraries to do it portably and faster.
use Shell qw( perl ); # { local @ARGV = (...); do $filename; }
use Shell qw( dir ); # glob() seems enough
use Shell qw( copy ); # File::Copy
use Shell qw( del ); # unlink
use Shell qw( cd ); # chdir
All the advices of the monks who replied to this node still apply. Some refactoring and moving filenames and tasks to configuration metadata driving the script could produce a much more robust and useful tool. But probably this isn't a priority or a need. So just two suggestions: (1) use / everywhere because Perl at Windows understand it very well unlike Windows itself; (2) maybe the Perl scripts "d:/perl/macc1" and "d:/perl/mmac3" can be converted to Perl modules with advantages to maintenance.
-
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.
|