Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-11-27 20:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls