Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for text in a .pab file

Status
Not open for further replies.

GOSCO

Technical User
Sep 26, 2000
134
GB
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, &quot;<mailbox.pab&quot;) or print &quot;Could not open file, $!&quot;;
@pab = <PAB>;

print &quot;@dates&quot;;
foreach $line (@pab) {
if ($line =~/$query/) {
print &quot;Match:$line<br>&quot;;
}
print&quot;$line&quot;;
}
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
++
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top