Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 surveying the Monastery: (2)
As of 2024-04-20 05:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found