Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: RegEx ignoring intervening characters?by webfiend (Vicar) |
on Jan 19, 2007 at 21:59 UTC ( [id://595611]=note: print w/replies, xml ) | Need Help?? |
(my $x = $s) =~ s/[^A-Z]//g;
That assigns the value of $s to $x, then performs the substitution on $x. $s is left unmolested.
So it's a perfectly valid element of your solution Update: Hey, how about I actually show it in action?
In Section
Seekers of Perl Wisdom
|
|