in reply to Re: Death of time_t Timer
in thread Death of time_t Timer

Also note that the month returned is 0..11 -- so you might want to add one to it in getime.

Doh! :)

Forgot to mention: Be sure you know the difference between calling a sub via &getime() and getime(). You might want the latter form. See perlsub for more info.

That has to do with @_ right?

Replies are listed 'Best First'.
Re: Re: Re: Death of time_t Timer
by Nkuvu (Priest) on Jun 18, 2003 at 22:46 UTC

    That has to do with @_ right?

    Partially. See this relevant bit from the perldoc:

    NAME(LIST); # & is optional with parentheses. NAME LIST; # Parentheses optional if predeclared/imported. &NAME(LIST); # Circumvent prototypes. &NAME; # Makes current @_ visible to called subroutine.

    So the passing of @_ is affected, as is the prototyping. I'm not too familiar with prototypes in Perl, so I'm not sure how things are affected when prototypes are circumvented... which is why I pointed to the perldocs instead of spelling it out myself. I know there's a difference, but haven't really looked into it. ;)