> Is it possible to do this No, at least not the way you are doing it.
Something like this will work (untested) my %replacements = (ARE => 756, TYP => 978, SPE => 840); $marque =~ s/(ARE|TYR|SPE)/$replacements{$1}/; Rob -----Original Message----- From: Olivier Wirz [mailto:[EMAIL PROTECTED] Sent: Monday, February 23, 2004 1:39 PM To: [EMAIL PROTECTED] Subject: substitution Hello, Is it possible to do this kind of substitute to change ARE in 756, TYP in 978 (not with an if) ...: $marque =~ s/(ARE|TYR|SPE)/(756|978|840)/; # don't bring the result I want. Thank you. Olivier -- GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...) jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>