Re: Newbie trying to cleanup/format text file

2003-12-23 Thread John W. Krahn
"John W. Krahn" wrote: > > Stuart Clemons wrote: > > > > I'm trying to cleanup and format this text file of user names, so that I > > have one column of user names. Here's the text file: > > > > The request will be processed at a domain controller for domain FOOBAR. > > > > Group name Misc >

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > I kept working at it and was finally able to get rid of the unwanted lines > in the text file using a series of nested if's. It's certainly not > elegant, but it works ! > > Surely there's a more efficient way to get rid of the unwanted lines. Definitely! > > > Anywa

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread William Martell
uot;William Martell" <[EMAIL PROTECTED]> > Sent: Monday, December 22, 2003 1:58 PM > Subject: Re: Newbie trying to cleanup/format text file > > > > Hi Stuart, > > > > I modified some of the code and it works better now. I now have an array > > nam

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread John W. Krahn
"John W. Krahn" wrote: > > open FH, 'c:/foobar.txt' or die "sourcefile open failed - $!"; > while ( ) { > next if 1 .. /^-+$/; > next if /^The command completed successfully/ .. eof( FH ); > print "$_\n" for /\S+/g; > } Or better: :-) open FH, 'c:/foobar.txt' or die "sourcefile op

re: Newbie trying to cleanup/format text file

2003-12-22 Thread stuart_clemons
I kept working at it and was finally able to get rid of the unwanted lines in the text file using a series of nested if's. It's certainly not elegant, but it works ! Surely there's a more efficient way to get rid of the unwanted lines. Anyway, here's what I came up with for now. This leaves

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread John W. Krahn
Stuart Clemons wrote: > > Hi all: Hello, > I'm trying to cleanup and format this text file of user names, so that I > have one column of user names. Here's the text file: > > The request will be processed at a domain controller for domain FOOBAR. > > Group name Misc > CommentThes