Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Perl migration script

by tcf03 (Deacon)
on Dec 12, 2007 at 12:44 UTC ( [id://656608] : note . print w/replies, xml ) Need Help??


in reply to Perl migration script

If all you want to do is run batch files, something like this should work. <opinion>Though, I think a better approach would be to replace the batch commands with perl.</opinion>

use strict; use warnings; my $batchfile = qq|batchfile.bat|; my $status = ( system("batchfile.bat") == 0 ) ? 0 : 1; print "$batchfile status = $status\n";

update

Fixed typos

Ted
--
"That which we persist in doing becomes easier, not that the task itself has become easier, but that our ability to perform it has improved."
  --Ralph Waldo Emerson