Hi,
Im trying to extract e-mail addresses from an outlook personnel address book.
If I drag the .pab file into notepad there is a lot of garbage, but there is also the text making up the e-mail addresses I want to extract.
The code looks like this:
$query="X400:";
open (PAB, "<mailbox.pab"
or print "Could not open file, $!";
@pab = <PAB>;
print "@dates";
foreach $line (@pab) {
if ($line =~/$query/) {
print "Match:$line<br>";
}
print"$line";
}
close(PAB);
I knoe that something is wrong, because I printed the whole line and I can't see any sign of the e-mail addresses im looking for.
If I use the find command in dos, this will display the required information. Though I don't want this done in dos I want in done in perl.
Obviously its something to do with the way the .pab file is formatted but I don't know how to get around this problem...
Im using a windows platform.
Can anyone spread any light???
Thanks
Andy
++
Im trying to extract e-mail addresses from an outlook personnel address book.
If I drag the .pab file into notepad there is a lot of garbage, but there is also the text making up the e-mail addresses I want to extract.
The code looks like this:
$query="X400:";
open (PAB, "<mailbox.pab"
@pab = <PAB>;
print "@dates";
foreach $line (@pab) {
if ($line =~/$query/) {
print "Match:$line<br>";
}
print"$line";
}
close(PAB);
I knoe that something is wrong, because I printed the whole line and I can't see any sign of the e-mail addresses im looking for.
If I use the find command in dos, this will display the required information. Though I don't want this done in dos I want in done in perl.
Obviously its something to do with the way the .pab file is formatted but I don't know how to get around this problem...
Im using a windows platform.
Can anyone spread any light???
Thanks
Andy
++