what about $code =~ tr/['"]/["']/;
? Hope it helps :) cheers paolino On Mon, 2008-09-22 at 10:19 -0700, Grant wrote: > I'd like to switch the " and ' characters in a block of text so that > all " characters become ' and all ' characters become ". The closest > thing I can come up with is the following, but of course it doesn't > work quite right because one is executed after the other: > > $code =~ s/"/'/g; > $code =~ s/'/"/g; > > Is there any way to switch them simultaneously? > > - Grant > -- Paolo Gianrossi Softeco Sismat S.p.A. - R&D Division via De Marini 1, 16149 Genova Tel: +39 010 6026 332 - Fax: +39 010 6026 350 E-Mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/