Well, if the log entries are consistant, why not just a simple split?
#!/usr/bin/perl -w use strict; my $calog = "/var/log/ca/ca.log"; my $line; my @certs = (); open LOG, "$calog" or die "Can't open $calog: $!\n"; while ($line = <LOG>) { my @entry = split ' ', $line; $certs[@certs] = $entry[7]; } print @certs;
Update: Quick Fix thanks to blakem.
In reply to Re: Array Problem
by jryan
in thread Array Problem
by dru145
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |