Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Re: question about perl

by rnahi (Curate)
on Mar 13, 2002 at 14:00 UTC ( #151375=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: question about perl
in thread How do I change the shebang line for all perl scripts in a directory

This is my output from Deparse in both Perl 5.6.0 and 5.6.1

perl -MO=Deparse -pi.bak -e "s[^#!/usr/local/bin/perl][#!/usr/bin/perl +]" LINE: while (defined($_ = <ARGV>)) { s[^#!/usr/local/bin/perl][#!/usr/bin/perl]; } continue { print $_; } -e syntax OK
There was no need for escaping the "!" and it worked fine (I searched perlre about the need for escaping the bang, but I couldn't find it. Did I miss something?).
So I couldn't replicate your error condition. Sorry.
However, I agree that your script is more readable. :)


Comment on Re: Re: Re: Re: question about perl
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (15)
As of 2014-10-02 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (65 votes), past polls