laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Dear Esteemed monks,
I'm working on a task which is as below: * Generate a list of dates from a given start date to a given end date * Get a list of files for each of the item(these are directories) in the csv file * Once I have a the two arrays, i.e one array consisting of a list of dates and the second array with the list of files for a directory,I have to check for the existence of each of the dates from the first array in the second array. * The following are the structures of the dates array and files array contains the filenames as @datelist = ("20030901", "20061017", "20050406", "20070101", "20080202"); @fileslist = ("DIR22.20060816", "DIR22.20050919", "DIR22.20061017", "DIR22.20060516", "DIR22.20050406"); I am using grep to check the existence of dates from the first array in the second array. Below is the code I'm using, please let me know whether this approach is correct or is there any other better way: Thanks in advance In reply to Grepping arrays, any better way to do this? by chanakya
|
|