in reply to Simple line regex again
I'll take a stab at this. I did test this and it appears to work flawlessly.
"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"
sulfericacid
open(LOG, "source2.txt") or die "Error: $!"; my @lines = <LOG>; close(LOG); foreach my $line (@lines) { $line =~ m/(.+)\s+(\d+),\s+(\d+)\s+(\(Birthday\) .+)/; print "$1 $2 $3 $4\n"; open(OUT, ">> $1/$2.txt") or die "Error"; print OUT "\n$3 $4"; } print "Done";
"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"
sulfericacid
|
---|
In Section
Seekers of Perl Wisdom