Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: perl -pi -e s'/^\s+//'g $file

by Anonymous Monk
on Apr 12, 2011 at 18:49 UTC ( #899027=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MO=Deparse -p -i.orig -e "s/foo/bar/; ... "
    BEGIN { $^I = ".orig"; }
    ...
        die "-p destination: $!\n" unless print $_;
    }
    -e syntax OK
    
  2. or download this
    #!/usr/bin/perl --
    
    ...
            die "-p destination: $!\n" unless print $_;
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://899027]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2018-07-23 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?