> what about > > $code =~ tr/['"]/["']/; > > ? I shouldn't have said characters. I'm actually trying to switch "'" and "'" without the double-quotes. Can that be done as simply as your one-liner above?
- Grant >> 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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/