Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re:**3 Compare of array

by flounder99 (Friar)
on Feb 11, 2004 at 21:06 UTC ( [id://328384]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Compare of array
in thread Compare of array

Data::Compare is a bit overkill unless you are comparing a lot of arrays. If you are just doing this compare, I would compare the elements.
@td = Today([$year,$month,$day]); @tod=($year,$month,$date); if ($td[0]==$tod[0] && $td[1]==$tod[1] && $td[2]==$tod[2]) { $bgcolor="#c0c0c0"; } else { $bgcolor="#FFFFFF"; }

--

flounder

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://328384]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found