if i print the values of k and n they have
Aug,Aug
Aug,Aug
Aug,Mar
Aug,Mar
the first two values are same .. so not sure y the if statement dosent pass.
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...
Feherke .. thanks a lot .. that was my mistake .. i rem reading that in a book .. but it had slipped from my mind ..
Feherke u suggested that this not a healthy perl practice .. could u please suggest how to do the same in perl .. can this be done without using command line commands.
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.