Bryan R Harris wrote:
************************************** $ptypeline = "# movable ortProj ortho 0.000 0.000"; ($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) || "(missing)"; print $ptype, "\n"; ************************************** The above code prints "1", where I want it to print "ortho". Is that possible? (Preferably in one line, since I'm a *big* fan of perl golf. =)
$ptype = $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i ? $1 : "(missing)"; Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>