Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: A little golfing challenge: replace digits by random letters (updated) -- onelinerby Eily (Monsignor) |
on Feb 10, 2019 at 20:24 UTC ( [id://1229740]=note: print w/replies, xml ) | Need Help?? |
That's already impressive, but why bother with chr in the first place? perl '-M0;@h{+a..z}=1'-pe 's/\d/(keys%h)[$&]/eg' input.txt works just as fine. Edit: this can still be reduced a little:
In Section
Seekers of Perl Wisdom
|
|