but i get error in EnginSite Perl Editor LEmy $in_file = "$logfile"; open my $in_fh, '<', $in_file or die "Could not open file $in_file: $! ++"; my $out_file = 'output.txt'; open my $out_fh, '>', $out_file or die "Could not open file $out_file: ++ $!"; while ( my $line = <$in_fh> ) { print {$out_fh} $line if $line =~ /production/; } my %stats; while ( my $line = <$file> ) { next unless $line =~ /TWO/; my ($time) = $line =~ /^(\d\d\d\d-\w\w\w-\d\d \d\d)/)/; ++$stats{$time}; } close $in_fh or die "Could not close file $in_file: $!"; close $out_fh or die "Could not close file $out_file: $!";
Any pointers ?C:\code>perl -wc a.pl syntax error at a.pl line 37, near "/^(\d\d\d\d-\w\w\w-\d\d \d\d)/)" a.pl had compilation errors.
In reply to Re^2: comb a logfile for time diff and occourance
by Anonymous Monk
in thread comb a logfile for time diff and occourance
by tuakilan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |