Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regex and writing lines in file

by choroba (Abbot)
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'
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Regex and writing lines in file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2014-08-28 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (261 votes), past polls