Now my dilemma is I want to filter this ouput by my preferred dates. I wanted it to output the date from yesterday and backwards. In other words I want to filter all the dates less than today's date (i.e. 2007-07-30, 2007-07-29, 2007-07-28, etc. and below). And finally count the number of lines for the final output.
Illegal octal digit '8' at -e line 1, at end of line
Was it perl thought that I was dealing with an octal number and when he came along with 8 or 9 (becasue of 2007-08-01) which stopped it from making sense, so perl quite rightly complained? Pls help. Tnx.
The key to my problem is 'interpolation'. The code that the Perl interpreter sees is:
print 2007-08-05;
which is some arithmetic (2007 - 08 - 05) containing two octal constants and a decimal constant. The proper syntax is I need to quote the interpolated date so that the interpreter sees a string instead: