( (shift @ARGV) ? (my $foo) : (my $bar) ) = "Hello";
Except, you don't know which variable has been assigned to. (Due to an oddity with my's behavior, both variables will be declared. One will be undef, though.)
And, this type of thing is better done with hashes, but you knew that.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
In reply to Re: my behavior with "NULL" declarations
by dragonchild
in thread my behavior with "NULL" declarations
by dsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |