This little thingy extracts of a Palm Addressbook DB
#!/usr/bin/perl -w use strict; use Palm::Address; my $debug=0; my $maxcount=0; ########### main ######### my $pdb = new Palm::Address; $pdb->Load("AddressDB.pdb"); my $count=0; foreach my $record (@{$pdb->{records}}) { # only select natural persons sporting stuff in custom4 next unless( defined $record->{fields}{name} and $record->{fields}{name} and defined $record->{fields}{custom4} and $record->{fields}{custom4} ); my $sn=$record->{fields}{name}; my $dates=$record->{fields}{custom4}; my $extras=(defined $record->{fields}{custom1})?'('.$record->{field +s}{custom1}.')':''; my $gn=(defined $record->{fields}{firstName})?$record->{fields}{fir +stName}:''; $debug and print "surname: $sn\n","givenname: $gn\n","extras: $extr +as\n","dates: $dates\n\n"; my @dates=split(/\n/,$dates); # one entry per line in custom4 foreach my $date (@dates){ my $event=''; my $name=''; if($date=~/^(\S+)\s+(.*)/){ # more than just a birthday? $event=$1; $date=$2; if($date=~/^(\S+)\s+(\S+)/){$date=$2;$name=$1}; # supercede g +ivenname if given here :-) }else{ $event='*'; # just a birthday } print "$date\t$event\t",($name?$name:$gn)," $sn\t$extras\n"; } last if($maxcount and ++$count>$maxcount); }