I think there are two main options: squish the assignment and modification together, or make a subroutine. For clarity I'd usually recommend the latter:
(my $squished_name = $name) =~ s/\W//g; my $squished_name = squish($name);
Hugo
In reply to Re: Idiom for a regex translation
by hv
in thread Idiom for a regex translation
by reasonablekeith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |