![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Simple perl one-liner for transforming text filesby DaveH (Monk) |
on Mar 06, 2003 at 01:08 UTC ( #240768=note: print w/replies, xml ) | Need Help?? |
Hi. Should this move to Obfuscated Code? :-)
I don't think it meets the "simple" requirement, but it is mostly on one line... ;-) Here is what B::Deparse makes of it though, for reference.
I'm not sure if the preceeding number is a requirement or not. Without the number prefix, I can get down to:
(To run on Win32, change all the ' into " - it should still work.) Hope that helps. Cheers, -- Dave :-) $q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print
In Section
Seekers of Perl Wisdom
|
|