Hi
Im reletively new to perl and the use of regexp. I have an email address e.g To:cnw40007@somewhere.com. I want to be able to parse the cnw40007 part using regular expressions and print it out. At the moment i have
open(FILE,'/cnw40007/mbox');
while (<FILE>) {
if (/To:/(\w+)(\d){8}) {
print
}
}
close FILE;
When i try to run it i keep getting errors.Does anybody know what i am doing wrong?
Im reletively new to perl and the use of regexp. I have an email address e.g To:cnw40007@somewhere.com. I want to be able to parse the cnw40007 part using regular expressions and print it out. At the moment i have
open(FILE,'/cnw40007/mbox');
while (<FILE>) {
if (/To:/(\w+)(\d){8}) {
}
}
close FILE;
When i try to run it i keep getting errors.Does anybody know what i am doing wrong?