so this piece of code compares the months. The data in node.txt is of this sort.
alpha1 Thu Aug 15 21:08:51 PDT 2012 - disable
alpha1 Thu Aug 15 21:11:43 PDT 2012 - enable
alpha1 Thu Mar 15 21:58:13 PDT 2012 - disable
alpha1 Sat Mar 24 00:41:12 PDT 2012 - enable
so the output basically...
so here im jst tryin to push all lines with todays date into the array.
but all the data is going thru and getting saved in the array.
$var has this thing
adminode Sun Mar 11 01:53:16 EST 2012 - technoman - sleeping nodename
adminnode Sun Mar 11 01:53:37 EST 2012 - superman - awake nodename...
hi
i have a file which has data like this
month car dealer year
jan lexus xyz 2012
mar merc ber 2011
april toyota wer 2010
with perl i want to replace month with a corresponding number like
jan -1
feb -2
mar -3
..
..
dec -12
the number of lines in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.