to escape particular characters in a given variable $var ->
$var =~ s/([CHARLIST])/\\$1/g;
(http://www.unix.org.ua/orelly/perl/cookbook/ch01_14.htm)
The complete Perl Bookshelf
Posted by sraghav on March 26, 2007
to escape particular characters in a given variable $var ->
$var =~ s/([CHARLIST])/\\$1/g;
(http://www.unix.org.ua/orelly/perl/cookbook/ch01_14.htm)
The complete Perl Bookshelf
Posted in PerlTips | Leave a Comment »