Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting perl file to batch file

Status
Not open for further replies.

Stiddy

IS-IT--Management
Joined
Dec 5, 2001
Messages
781
Location
US
Now, I know a perl script can be converted to an executable, but it seems to me that I remember being able to convert to batch also. I just can't seem to find that source again. Anyone know?
 
Okay, so I found the answer. It is 'pl2bat' if anyone else is interested.
 
yeah.
pl2bat script.pl

but it only has limited use - you still need to have perl installed for it to work. I would like to figure out how to compile perl into a self contained file, so that I can run a perl script on a (windows) system that doesn't contain perl. like a .exe or something. but I can't figure out how to do it
 
m4trix,

I have successfully run some simple perl scripts on a windows box without perl installed. I say simple because I don't know what would happen if I had a script with say; use Date::Manip;

You need perl.exe, perl56.dll, (both are in the \perl\bin directory) and the script of course.

And they fit on one floppy so you can carry it around on your sneakernet.

HTH

tgus

____________________________
Families can be together forever...
 
Thanks for the comments. Here is a link to the perl to executable program if you need it m4trix.

What I was really trying to accomplish here is actually trying to help out another fellow tek-tipper. If you see thread616-336805.
Well I don't know the answer to the question but I thought, HMMMM, maybe perl will tell me. So I tried the following:

print "Enter something as input: ";
$var = <STDIN>;
#and then converted it to batch hoping pl2bat would show #me the syntax for DOS, but as tgus has stated above, you #still need perl.exe and perl56.dll in order for the batch #to be interpreted. So if anyone knows please answer the #post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top