Re: parsing large amounts of text

2004-06-29 Thread Andrew Gaffney
John W. Krahn wrote: Andrew Gaffney wrote: I'm working on a custom Perl script to parse my Apache logs and report custom information. When I run the following program, it ends up eating all available RAM (the system has 1GB) and dying. My access_log is ~410MB. Am I doing something wrong? The only p

Re: parsing large amounts of text

2004-06-29 Thread John W. Krahn
Andrew Gaffney wrote: > > I'm working on a custom Perl script to parse my Apache logs and report custom > information. When I run the following program, it ends up eating all available > RAM (the system has 1GB) and dying. My access_log is ~410MB. Am I doing > something wrong? The only problems I

Re: parsing large amounts of text

2004-06-28 Thread Jeff 'japhy' Pinyan
On Jun 28, John W. Krahn said: >>$line =~ /^(\d+\.\d+\.\d+\.\d+) (.+?) (.+?) \[(.+?)\] \"(?:(.+?) )?(.+)(?: >> (.+?))?\" (\d+) (.+?) \"(.+?)\" \"(.+?)\"$/; > >If you are not using $2, $3, $5, $7 and $10 why capture them? You >should probably replace .+? with something more meaningful that won

Re: parsing large amounts of text

2004-06-28 Thread John W. Krahn
Andrew Gaffney wrote: > > I'm working on a custom Perl script to parse my Apache logs and report custom > information. When I run the following program, it ends up eating all available > RAM (the system has 1GB) and dying. My access_log is ~410MB. Am I doing > something wrong? The only problems I