Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Regex and writing lines in file

by choroba (Chancellor)
on Apr 30, 2013 at 11:24 UTC ( #1031389=note: print w/replies, xml ) Need Help??


in reply to Regex and writing lines in file

Perl regular expressions are powerful. This kind of activity would be considered obfuscation, though, and I would not recommend it for production code:
perl -pe 's/.*pattern\n$/<>for 1..3;$_/e'
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-01-17 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (158 votes). Check out past polls.