Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I tried06/19/2007 10:50 AM <DIR> 1dfgfg 07/20/2007 02:35 PM <DIR> asdasdad
and it printed out a million blank lines?open(LOG, "home.txt") or die "Error: $!"; my @lines = <LOG>; close(LOG); foreach my $line (@lines) { $line =~ m/\s+([a-zA-Z0-9])$/; print "$1<br>"; }
A little tougher and since I had problems with the first one, ..
In the one above all I need is the username. none of the slashes or anything. Really this is a DIR dump and I need to see if the username appears in both files, or just one. Can someone give me a hand?\\STPFS03asd MRAD\abeissel \\stpfs03\E$\CISROOT\Home\123username +\ 163.59 132 750 \\STPFS02 serv\USERNAME \\Stpfs02\E$\CISROOT\Home\anotherusernam +e\ 18.37 10 29
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Two regex problems (easy)
by grinder (Bishop) on Aug 13, 2007 at 16:51 UTC | |
|
Re: Two regex problems (easy)
by thezip (Vicar) on Aug 13, 2007 at 17:17 UTC | |
|
Re: Two regex problems (easy)
by FunkyMonk (Bishop) on Aug 13, 2007 at 16:33 UTC | |
|
Re: Two regex problems (easy)
by moritz (Cardinal) on Aug 13, 2007 at 16:34 UTC | |
|
Re: Two regex problems (easy)
by jhourcle (Prior) on Aug 13, 2007 at 16:34 UTC | |
|
Re: Two regex problems (easy)
by jettero (Monsignor) on Aug 13, 2007 at 16:31 UTC |