in reply to extract a log file to filter previous dates

Interpolation problems aside, you'd be much better off writing this as a single call to perl on the other side.

my @result = $telnet->cmd( qq{perl -MPOSIX=strftime -lane 'BEGIN{$date + = strftime( "%Y-%m-%d", localtime );} print $F[3] if $F[3] lt $date' + /data/pinpe.csv} );

(Possibly seasoning with the appropriate -F, argument given the file extension; see perlrun for more details on autosplitting.)

Replies are listed 'Best First'.
Re^2: extract a log file to filter previous dates
by pinpe (Novice) on Aug 03, 2007 at 01:16 UTC
    $F3 --> What is this for?

    qq{perl -MPOSIX=strftime -lane --> I'm not familiar with this but I'll give it a try. Tnx.

    Br, Pete