Jan 1, 1915 (Birthday) Franck Pourcel - singer
Jan 3, 1926 (Birthday) George Martin - singer
Jan 3, 1945 (Birthday) Stephen Stills - singer
Jan 3, 1946 (Birthday) John Paul Jones - singer
####
1963 G Woods succeeds Eugene Black as president of the World Bank
1964 Federation of Rhodesia & Nyasaland dissolved
1965 International Cooperation Year begins
####
#!/usr/bin/perl
use warnings;
use strict;
open(LOG, "source.txt") or die "Error: $!";
my @lines = ;
close(LOG);
foreach my $line (@lines)
{
$line =~ m/(\w)\s+(\d+),\s+(\d+)\s+(\(Birthday\)\s.+)/i; # 1 is month, 2 is day of month, 3 is year, 4 is the text
print "$1 $2 $3 $4\n";
open(OUT, ">> $1/$2.txt") or die "Error"; # write our line appending to the bottom of the file
print OUT "$3, $4\n";
}
print "Done";