in reply to Array Problem
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Array Problem
by blakem (Monsignor) on Sep 14, 2001 at 04:50 UTC |