"Charles K. Clarkson" wrote:

> : >> my %replacements = (ARE => 756, TYP => 978, SPE => 840);
> : >> $marque =~ s/(ARE|TYR|SPE)/$replacements{$1}/;
> : >
> : > my %replacements = (ARE => 756, TYP => 978, SPE => 840);
> : > $marque =~ s/(ARE|TYR|SPE)/$replacements{$1}/eg;
> ... Though I think I would disagree with Rob
> and use this to aid maintainability:
>
> for ( $marque ) {
>     s/ARE/756/g;
>     s/TYR/978/g;
>     s/SPE/840/g;
> }
>
> HTH,
>
> Charles K. Clarkson

Definitely.  Much easier on the eyes.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to