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";
In reply to Re: Simple line regex again
by sulfericacid
in thread Simple line regex again
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |