in reply to More efficient munging if infile very large
And avoid the extra variables althogether, and get $_ set for you all at once? Since you've already got $uclc checked for the right state, you don't need the second wasteful if.@in = map { $uclc eq 'lc' ? lc : uc } @in;
Or, even better (1 if, instead of N...)
@in = $uclc eq 'lc' ? map { lc } @in : map { uc } @in;
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
|
|---|