Re: adding data to a file before it gets regexed

2007-09-14 Thread Pat Rice
Thanks all for the help I'm havng a go wrighting it at the moment Pat On 9/13/07, Moon, John <[EMAIL PROTECTED]> wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 13, 2007 2:01 PM > To: Perl beginners > Subject: Re: adding data to a f

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 2:01 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > From: John W. Krahn [mailto:[EMAIL PROTECTED] >> >> Here is another way to do it: >&g

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: From: John W. Krahn [mailto:[EMAIL PROTECTED] Here is another way to do it: my $logs_total = () = <*log>; my $processed = @ARGV = ; my %logs; $logs{ $ARGV }++ while <>; print "There are $logs_total logs HERE\n"; print "I processed $processed logs\n"; for my $filenm ( sort ke

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 12:42 PM To: Perl beginners Subject: Re: adding data to a file before it gets regexed Moon, John wrote: > > thanks all for the replies, I'm trying to parse log files. >

Re: adding data to a file before it gets regexed

2007-09-13 Thread John W. Krahn
Moon, John wrote: thanks all for the replies, I'm trying to parse log files. so I got a bunch of logs in a directory, put them together and then parse them, I'm trying to keep a reference of the log files, so I know what log they came from, as I'm need to keep the file name to put it in to a an

RE: adding data to a file before it gets regexed

2007-09-13 Thread Moon, John
From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: Thursday, September 13, 2007 11:14 AM To: Andrew Curry Cc: Chas Owens; beginners@perl.org; [EMAIL PROTECTED] Subject: Re: adding data to a file before it gets regexed thanks all for the replies, I'm trying to parse log files. so I got a bun

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
On 9/13/07, Andrew Curry <[EMAIL PROTECTED]> wrote: > > But whats your end goal? What is it going to do at the end? > > -Original Message- > From: Pat Rice [mailto:[EMAIL PROTECTED] > Sent: 13 September 2007 14:16 > To: Chas Owens > Cc: beginners@perl.org &

RE: adding data to a file before it gets regexed

2007-09-13 Thread Andrew Curry
But whats your end goal? What is it going to do at the end? -Original Message- From: Pat Rice [mailto:[EMAIL PROTECTED] Sent: 13 September 2007 14:16 To: Chas Owens Cc: beginners@perl.org Subject: Re: adding data to a file before it gets regexed Thanks Chas for the reply what I&#

Re: adding data to a file before it gets regexed

2007-09-13 Thread Pat Rice
Thanks Chas for the reply what I'm trying to do is add the file name to the start of the string beign placed in the array, I havent used hashes so I'm not fiormlar with using hashes, but I am open to using them. The reasion I am trying to add the string to the line, is so that I can use it in a r

Re: adding data to a file before it gets regexed

2007-09-13 Thread Chas Owens
On 9/13/07, Pat Rice <[EMAIL PROTECTED]> wrote: > hi all > I have the following problem. > I'm trying to read the a file in line by line. using a for each statment, > but I want to modify each line as it come in so that I can add the file > name that I am looking in to the line. > > eg. looing in