monk2b has asked for the wisdom of the Perl Monks concerning the following question:
if(!defined($mystring)){ dosumpton("nogames",undef,undef,undef); } elsif ($mystring){ ($major,$minor,$bld,$rev) = split(/\./, $mystring); if($major){ if($minor){ if($bld){ if($rev){ dosumpton($major,$minor,$bld,$rev); } else { dosumpton($major,$minor,$bld,undef); } } else { dosumpton($major,$minor,undef,undef); } } else { dosumpton($major,undef,undef,undef); } } } else { # Something went wrong and we should be notified about it }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Are there corner cases I am missing
by kennethk (Abbot) on Nov 14, 2011 at 16:55 UTC | |
|
Re: Are there corner cases I am missing
by jethro (Monsignor) on Nov 14, 2011 at 16:58 UTC | |
|
Re: Are there corner cases I am missing
by choroba (Cardinal) on Nov 14, 2011 at 16:54 UTC | |
|
Re: Are there corner cases I am missing
by monk2b (Pilgrim) on Nov 14, 2011 at 18:02 UTC | |
by GrandFather (Saint) on Nov 14, 2011 at 20:33 UTC | |
by jethro (Monsignor) on Nov 15, 2011 at 11:37 UTC |