in reply to How to compare arrays? (xmms alarm clock)

In this case why use arrays at all?

Don't split the $ARGV, join localtime[2]and localtime[1] with a : and compare the string..

At least, that's what I did in almost the exact same situation (acutally I got tired of people kicking the back of my chair to wake me up after lunch). Working my way to a "snooze button" now :-)

Replies are listed 'Best First'.
Re: Re: How to compare arrays? (xmms alarm clock)
by ginseng (Pilgrim) on Jun 29, 2001 at 12:05 UTC

    believe it or not, given my newbyish questions, i have been programming since 1979...but i guess this is one more of those programs every programmer needs to write eventually :) actually, i did this about 5 years ago in Visual Basic (/me crosses himself) with the modem making a call on the data line to the voice line...

    i would assume that joining the localtime elements would require some formatting, and that a sprintf would actually be appropriate. one should assume (or better, verify) that the wakeup time has a leading zero, if minute is a single digit.

    when it comes down to it, though, i like perl arrays... that's why i did it the way i did ;)