On 5/9/07, Rob Dixon <[EMAIL PROTECTED]> wrote:
Steve Bertrand wrote:
>> but if they appear in the file in a different sequence then you also
>> need to rewind and start looking at the beginning of the file once
>> again like this:
>>
>> ID:
>> foreach my $prime_id ( @id_hits ) {
>>while (
Steve Bertrand wrote:
but if they appear in the file in a different sequence then you also
need to rewind and start looking at the beginning of the file once
again like this:
ID:
foreach my $prime_id ( @id_hits ) {
while ( my $line = <$AFILE> ) {
if ( $line =~ /$prime_id/ ) {
pr
> but if they appear in the file in a different sequence then you also
> need to rewind and start looking at the beginning of the file once
> again like this:
>
> ID:
> foreach my $prime_id ( @id_hits ) {
>while ( my $line = <$AFILE> ) {
> if ( $line =~ /$prime_id/ ) {
>print "
Rob Dixon wrote:
Robert Hicks wrote:
I decided to back up a bit and try a more simple routine. I have the
array @id_hits populated and I can search the log for the line and
print it. The problem is it only finds the first match and that is it.
foreach my $prime_id ( @id_hits ) {
while ( m
Jeff Pang wrote:
-Original Message-
From: [EMAIL PROTECTED]
Sent: May 8, 2007 9:54 PM
To: [EMAIL PROTECTED]
Cc: beginners@perl.org
Subject: Re: looping through a file
my @lines = <$AFILE>;
foreach my $prime_id ( @id_hits ) {
foreach my $line( @lines ) {
if (
Robert Hicks wrote:
I decided to back up a bit and try a more simple routine. I have the
array @id_hits populated and I can search the log for the line and print
it. The problem is it only finds the first match and that is it.
foreach my $prime_id ( @id_hits ) {
while ( my $line = <$AFILE>
-Original Message-
>From: [EMAIL PROTECTED]
>Sent: May 8, 2007 9:54 PM
>To: [EMAIL PROTECTED]
>Cc: beginners@perl.org
>Subject: Re: looping through a file
>my @lines = <$AFILE>;
>foreach my $prime_id ( @id_hits ) {
> foreach my $line( @lines ) {
>
>
To: beginners@perl.org
Sent: Tuesday, May 8, 2007 4:39:12 PM (GMT+0200) Auto-Detected
Subject: Re: looping through a file
I decided to back up a bit and try a more simple routine. I have the
array @id_hits populated and I can search the log for the line and print
it. The problem is it only f
I decided to back up a bit and try a more simple routine. I have the
array @id_hits populated and I can search the log for the line and print
it. The problem is it only finds the first match and that is it.
foreach my $prime_id ( @id_hits ) {
while ( my $line = <$AFILE> ) {
if ( $li
Robert Hicks schreef:
> open my $IFILE, '<', $IDFILE || die "Could not open $IDFILE: $!";
This doesn't mean what you assume it does. It is a mix up of:
open(my $IFILE, '<', $IDFILE) || die "Could not open $IDFILE: $!";
and
open my $IFILE, '<', $IDFILE or die "Could not open $IDFILE: $!";
Hi Guys
Following is a log file extract which I desperately need to covert to
coma separated for an entire logile called access.log (squid proxy log)
for reporting purposes. There has been some internet surfing abuse on a
client's network.
1178606984.937 1 192.168.1.55 TCP_DENIED/407 1904 PO
Chas Owens wrote:
On 5/7/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
snip
I think part of the problem is the 'shift'ing that I was doing. I am
looking into that. Basically I was shift'ing the @log out of existence
after the first pass.
snip
That sounds like a viable candidate for the warning a
On 5/7/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
snip
I think part of the problem is the 'shift'ing that I was doing. I am
looking into that. Basically I was shift'ing the @log out of existence
after the first pass.
snip
That sounds like a viable candidate for the warning as well.
snip
> A
Chas Owens wrote:
On 5/7/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
I have one file that contains a log. I do a substr to get the
information out of that and push it into an array.
I have a second file that contain another log. I need to loop through
the items in the array and find them in thi
On 5/7/07, Robert Hicks <[EMAIL PROTECTED]> wrote:
I have one file that contains a log. I do a substr to get the
information out of that and push it into an array.
I have a second file that contain another log. I need to loop through
the items in the array and find them in this log. Once I find
15 matches
Mail list logo