skynelson has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone offer advice on how to write the output so that the results look like a properly formatted batch file?
Output looks like:my $outfile = "mybatchfile.bat"; open( OUTPUT, ">", $outfile) or die "Can't open file " . $outfile. " : + $!"; { print OUTPUT '@echo off\n setlocal\n set PATHNAME=C:\TEMP\%1_REGRESSION\n', 'set WAIT_TIME=240000\n set URL=\"http://myurl.biz\"\n', 'set PWD="megapassword"\n set EMAIL_TO_STRING="bob@test.com"; }
@echo off\n setlocal\n set PATHNAME=C:\TEMP\%1_REGRESSION\n set WAIT_TIME=240000\n set URL=\"http://myurl.biz\"\n set PWD="megapassword"\n set EMAIL_TO_STRING="bob@test.com
instead of:
@echo off
setlocal
set PATHNAME=C:\TEMP\%1_REGRESSION
set WAIT_TIME=240000
set URL="http://myurl.biz"
set PWD="megapassword"
set EMAIL_TO_STRING="bob@test.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using perl to output a DOS batch file
by johngg (Canon) on Oct 15, 2010 at 19:16 UTC | |
|
Re: Using perl to output a DOS batch file
by halfcountplus (Hermit) on Oct 15, 2010 at 19:05 UTC | |
|
Re: Using perl to output a DOS batch file
by Anonymous Monk on Oct 15, 2010 at 19:21 UTC |