Output:my $str = "(foo + bar)\n(baz * quux)\n"; # opening and closing parens and space => underscore $str =~ tr/() /_/; # newline => space $str =~ tr/\n/ /; print "<<$str>>\n";
<<_foo_+_bar_ _baz_*_quux_ >>
In reply to Re: Reg exp questions
by Anonymous Monk
in thread Reg exp questions
by carolw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |