in reply to A little regex help please!

Let kk.txt a file with your data.
Run this code like perl program.pl kk.txt
#!/usr/bin/perl -l use warnings; use strict; undef $/; my $txt = <>; (my $number) = $txt =~ /mailbox (\d{11})/; (my $from) = $txt =~ /From: (.*?)\n/; print "$number -> $from\n";