![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: One liner to subtract by 2by choroba (Archbishop) |
on Jul 24, 2013 at 14:05 UTC ( #1046122=note: print w/replies, xml ) | Need Help?? |
You can use the /e switch of the substitution operator:
Update: I am not sure how to search for the line, though, because you did not give any information on how these lines are structured. Adding that to the one-liner is easy, e.g. let's pretend we want to process lines beginning with 0TONY:
Update 2: sprintf added. Thanks derby.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|