On 7 Sep 2007 at 9:47, Chas Owens wrote:

> On 9/7/07, Chas Owens <[EMAIL PROTECTED]> wrote:
> snip
> > #FIXME: this creates invalid dates like 2007-02-30
> > sub rand_date {
> >         sprintf "%04d-%02d-%02d",
> >                 2000 + int rand 7,
> >                 1 + int rand 12,
> >                 1 + int rand 31;
> > }
> snip
> 
> Actually that sub can't return "2007-02-30", kudos to anyone else who
> can spot why.

No return statement?



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to