Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Fast Replacement

by gurpreetsingh13 (Scribe)
on Jun 14, 2013 at 04:44 UTC ( #1038884=note: print w/replies, xml ) Need Help??


in reply to Fast Replacement

Assuming you want to replace all occurrences within the file, why not just use perl command line.
perl -pi -e 's/!/\n/g' <filename>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038884]
help
Chatterbox?
[markong]: " Perl: the Markov chain saw" :D aha
[Discipulus]: thanks 1nickt but seems i'm not able to use it correctly...
[Discipulus]: Eily i'm testing a failure: i ok if i get bad results.. perhaps there is another way to do it...
[Discipulus]: in other words: i have a contructor that carps on missing arguments and I want to test that it fails correctly, without carping out in the test output

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2018-01-22 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (233 votes). Check out past polls.

    Notices?