function perl_regex 
{ 
  local STR=${2:-'$_'}
  STR=${STR/'"'/'\"'}
  STR=${STR/'$0'/'$_'}
  perl -lne "/$1/ and print \"$STR\"";
}
[ ]
 

Leave a Reply

*