Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Batch files in Win/Perl

by ikegami (Patriarch)
on Nov 21, 2004 at 19:27 UTC ( [id://409404]=note: print w/replies, xml ) Need Help??


in reply to Batch files in Win/Perl

Notice how STDIN redirection doesn't work below.

>copy con script.pl while (<STDIN>) { s/[aeiou]/!/ig; print; } ^Z >script.pl < script.pl >perl script.pl < script.pl wh!l! (<STD!N>) { s/[!!!!!]/!/!g; pr!nt; } >ver Microsoft Windows XP [Version 5.1.2600]

It works fine with batch files, however. That's where pl2bat comes in. It makes it so you don't have to explicitly mention "perl" to execute the script, without suffering from the above bug.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://409404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found