"be consistent" | |
PerlMonks |
Re: default values for listsby Elgon (Curate) |
on Sep 17, 2002 at 15:09 UTC ( [id://198507]=note: print w/replies, xml ) | Need Help?? |
Hi pike, You could try using the trinary operator...
In the example given, if @a returns true (in scalar context ie. has a nonzero length) then it is copied into @d, otherwise the contents of @c are copied into @d. Update: Arrgh, fglock beat me to it! "Rule #17 of Travel: Never try and score dope off Hassidic Jews while under the impression that they are Rastafarians."
In Section
Seekers of Perl Wisdom
|
|