- FUTURE DIRECTIONS
- SEE ALSO
Mail::Addressbook::Convert::Pine - convert to and from Pine formatted addressbooks
my $pine = new Mail::Addressbook::Convert::Pine();
my $PineInFile ="pineSample.txt"; # name of the file containing the Ldif data
# Convert Pine to Standard Intermediate format
# see documentation for details on format.
my $raIntermediate = $pine->scan(\$PineInFile);
# This will also work
#my @PineInArray = @arrayContainingThePineData;
#my $raIntermediate = $pine->scan(\@PineInArray);
# Convert back to Pine
my $raPineOut = $pine->output($raIntermediate);
print join "", @$raIntermediate;
print join "", @$raPineOut;
Perl, version 5.001 or higher
This module is meant to be used as part of the Mail::Addressbook::Convert distribution.
It can convert a Pine addressbook to a Standard Intermediate format(STF) and a STF to Pine As part of the larger distribution, it will allow conversion between Pine and many other formats.
To use to convert between Pine and Eudora as an example, you would do the following
my $Pine = new Mail::Addressbook::Convert::Pine();
my $Eudora = new Mail::Addressbook::Convert::Eudora();
my $PineInFile ="pineSample.txt"; # name of the file containing the Pine data
my $raIntermediate = $Pine->scan(\$PineInFile);
my $raEudora = $Eudora->output($raIntermediate); # reference to an array containing a Eudora addressbook
Standard Intermediate Format(STF) :
The addressbook format that is used as an intermediate between conversions. It is rfc822 compliant and can be used directly as a Eudora addressbook. Do not use a Eudora addressbook as an STF. Some versions of Eudora use a format, that while RFC822 compliant, will not work as an STF. Run the Eudora addressbook through $Eudora->scan()
Pine addressbook: A Pine addressbook. This module works on pine . You can find information on pine by searching for pine on google.com or going to http://www.washington.edu/pine/.
no arguments needed.
Input : a reference to an array containing a pine file or a reference to a scalar containing the file name with the pine data. Returns: a reference to a STF ( see above).
Input: a reference to a STF ( see above). Returns : a reference to an array containing a pine file.
This only converts email address, aliases, and mailing lists. Phone numbers, postal addresses and other such data are not converted.
You can find information on Pine at http://www.washington.edu/pine/
This code is derived from the code used on www.interguru.com/mailconv.htm . The site has been up since 1996 The site gets about 8000 unique visitors a month, many of whom make addressbook conversions. The code has been well tested.
Original Version 2001-Sept-09
Copyright (c) 2001 Joe Davidson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html). or the GPL copyleft license ( http://www.gnu.org/copyleft/gpl.html)
Mail::Addressbook::Convert was written by Joe Davidson <firstname.lastname@example.org> in 2001.