in reply to extract a log file to filter previous dates
The key to your 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. You need to quote the interpolated date so that the interpreter sees a string instead:
@Discon=$telnet->cmd("cat /data/pinpe.csv | nawk '{print \$4}' | perl +-ne 'print if \$_ lt \'$DATE[0]\''");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: extract a log file to filter previous dates
by pinpe (Novice) on Aug 03, 2007 at 18:12 UTC | |
by GrandFather (Saint) on Aug 05, 2007 at 03:22 UTC | |
|
Re^2: extract a log file to filter previous dates
by pinpe (Novice) on Aug 03, 2007 at 18:36 UTC |