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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.