sub finger { open (GPG, "gpg --fingerprint |") or die "unable to open pipe sys call (1)... Broken? $!"; for (;;) { { EXP: if ( /(?i)expires/ ) { y<-]>//d; $expdate = +(split)[4]; print $expdate,"\n"; } FPR: if (/talx/ig .. /expire/ig) { if (/key/i) { y<[Key,fingerprint,=]>//d; y{ }//d; print FPR $_; print "Now deleting key\n"; # call; last; } } KEY: if ( /(?i)pub/ and /(?i)talx/) { $keyid = (substr ($_,11,9)); } } # END FOR LOOP close (GPG) or die "unable to close pipe sys call (0)... Broken? $!"; } # END ROUTINE &finger(goto EXP);