in reply to Parsing your script's command line
Very nice, ++
However, I have a small question on this snippet:
my $thing = shift; $thing ||= 'default' unless defined $thing;
Surely the || is redundant here?
my $thing = shift; $thing = 'default' unless defined $thing;
This seems to do the job just as well?
Or am I missing something?
thx
dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Parsing your script's command line
by yosefm (Friar) on Sep 04, 2003 at 11:48 UTC | |
by Not_a_Number (Prior) on Sep 04, 2003 at 20:17 UTC | |
by JadeNB (Chaplain) on Sep 07, 2008 at 20:16 UTC |
In Section
Tutorials