in reply to Re^2: return stripped characters
in thread return stripped characters

Or, to use a conditional if construct:

my $stripped; $stripped = $1 if $salutation =~ s/(\(.*?\))//;

This is functionally equivalent to the parent post, just a different style of expressing it.

Update: I was trying to be too concise, thanks to tlm for pointing me to the error of my ways. Code has been updated to predeclare $stripped, since that is much more reliable than declaration and assignment in one step with a conditional.

radiantmatrix
require General::Disclaimer;
s//2fde04abe76c036c9074586c1/; while(m/(.)/g){print substr(' ,JPacehklnorstu',hex($1),1)}

Replies are listed 'Best First'.
Re^4: return stripped characters
by tlm (Prior) on Apr 27, 2005 at 01:03 UTC

    Nope. (See NOTE at the end of the cited section.)

    the lowliest monk