Richard Thomas a écrit :
Hi,

Thanks for all your replies.

A few points about the batch file I would like to convert is that it has the following:

1) labels and goto's
2) if statements
3) variables

I tried the first suggestion on the following batch file that uses labels and gotos:

goto.bat
======
:begin
echo hello world
goto begin


goto.pl
=====
use strict;
use warnings;

my $command;

$command=':begin';
system ($command);

$command='echo hello world';
system ($command);

$command='goto begin';
system ($command);


This shows that it's not just about transferring the commands from .bat to .pl.


You must put those command in a "something.bat" in the PATH and use
"system( "something" );". But that doesn't translate the ".bat" script
in Perl, it just execute it. Why do you want to translate it anyway :
multiplatform ? easier to read and enhance ?

--
Jedaï


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to