in reply to output the read result into a log file

So what do you want the output to look like?

And what's the input?

It's hard to help you if all you provide us is "this program doesn't work, it produces nearly empty output".

We can't read your mind, and even if you provided examples of the input files in a different thread, you can't expect us to remember it.

  • Comment on Re: output the read result into a log file

Replies are listed 'Best First'.
Re^2: output the read result into a log file
by tuakilan (Acolyte) on Mar 04, 2008 at 08:01 UTC
    updated as requested
      Better. Now it is evident that
      if (m/^(.*) UTC.*refs = (\d+)$/) { ^^^^
      does not match
      2007-Jan-07 00:00:01 UTC (GMT +0000) - Poll: channel = two, ref = com, + id = 133714761

      Try
      # slightly altered--v if (m/^(.*) UTC.*ref .*? = (\d+)$/) { my $t = $1; $refs = $2; $dt = $Strp->parse_datetime($t); $timestamp = $dt->epoch(); warn "found: $. $timestamp\t$refs\n"; }
      That seems to mach, and will tell you about it. Now, if that does not go to your file, it will have to do with later steps.