=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example2.pl,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- palm/Palm-Keyring/examples/example2.pl 2007/01/30 04:59:55 1.2 +++ palm/Palm-Keyring/examples/example2.pl 2007/08/10 05:13:31 1.4 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $RedRiver$ +# $RedRiver: example2.pl,v 1.3 2007/01/31 04:17:15 andrew Exp $ use strict; use warnings; @@ -11,12 +11,12 @@ $pdb->Load("Keys-Gtkr-example.PDB"); $pdb->Password('12345'); -foreach (0..$#{ $pdb->{'records'} }) { - next if $_ == 0; - my $rec = $pdb->{'records'}->[$_]; +foreach my $rec (@{ $pdb->{records} }) { my $acct = $pdb->Decrypt($rec); - print join ":", $rec->{'data'} , $acct->{'account'}, - $acct->{'password'}, $acct->{'notes'}; + my $d = $acct->{3}->{data}; + my $date = ($d->{year} + 1900) . '/' . ($d->{month} + 1) . '/' . $d->{day}; + print join ":", $acct->{0}->{data} , $acct->{1}->{data}, + $acct->{2}->{data}, $date, $acct->{255}->{data}; print "\n"; }