in reply to Passing regex result into function

Check this one-liner out for setting a variable to empty string if a regex returns undef: http://www.perlmonks.org/?node_id=1149527

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks