On Friday, July 26, 2002, at 07:44 , Nikola Janceski wrote:
> Can I put an assignment in an if(){} condition?
I think the issue is,
would you really want to maintain that code?
> ex:
> if( my($var) = $string =~ /(\d+)/){
> # do stuff here
> }
>
> And does the scope of $var in the example scope to the closing if } or )?
so whether or not one could do the trick
I would go with something more boring
if( $string =~ /(\d+)/){
# we matched, save our $1
my $tmp_number = $1;
.....
}
since in the long haul I can get a 'normal'
to maintain the code...
ciao
drieux
---
> And are rubber pants considered business casual?
always consult with the dominitrix of fashion
in your corporate structure as to how casual is casual....
personally I keep waiting for a legitimate
corporate implementation of the classic combat
survival vest for load carrying all of the
required 'road warrier' techno-gadgets...
Preferably woven in Kevlar Threat Level III
and institutional IBM blue....
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]