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'
[download]
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Comment on
Re: Regex and writing lines in file
Download
Code
In Section
Seekers of Perl Wisdom