in reply to Idiom for a regex translation
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Idiom for a regex translation
by reasonablekeith (Deacon) on Apr 22, 2005 at 09:54 UTC | |
by hv (Prior) on Apr 22, 2005 at 10:11 UTC | |
by reasonablekeith (Deacon) on Apr 22, 2005 at 10:20 UTC | |
by tlm (Prior) on Apr 22, 2005 at 10:23 UTC |