On Wednesday, June 26, 2002, at 08:48  AM, Shishir K. Singh wrote:

>> $out = $1 if ($in =~ /\((.*?)\)/);
> Nope..won't work..I take it back!!
>

>looks ok to me. except it adds extra strokes to previous answer.
>what do you think is wrong with it?

It will work fine as far as the regex is concerned. I think what Todd may want is to 
check the $out for defined or undefined. This line won't give him the same kind of 
validation. 


Perhaps..he should be doing it this way

$in =~ /\((.*?)\)/;
$out = (defined($1) ? $1 : "default/undef/whatever??";

 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to