fubber has asked for the wisdom of the Perl Monks concerning the following question:
I want the 3 $_ instruction to disappear and the single instruction, that emerges, to work on the array at once without while, ugly braces etc.
I would like it to be something like:foreach ( @subtitle ) { $_ =~ s/º/s/; $_ =~ s/þ/t/; $_ =~ s/ª/S/; }
Thanks for all your time, I really appreciate it.@subtitle =~ s/list/list/g;
20070708 Janitored by Corion: Moved text out of code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ugly code
by Limbic~Region (Chancellor) on Jul 07, 2007 at 22:29 UTC | |
|
Re: ugly code
by almut (Canon) on Jul 07, 2007 at 22:29 UTC | |
|
Re: ugly code
by Joost (Canon) on Jul 07, 2007 at 22:24 UTC | |
|
Re: ugly code
by jZed (Prior) on Jul 07, 2007 at 22:23 UTC | |
|
Re: ugly code
by parv (Parson) on Jul 08, 2007 at 03:24 UTC | |
by bart (Canon) on Jul 08, 2007 at 16:10 UTC | |
by johngg (Canon) on Jul 08, 2007 at 22:15 UTC |