#!/usr/bin/perl -wl
use strict;
use Time::Local;
my $PASSWORD = "/path/to/password.file";
my $DAYS = 60 * 60 * 24 * 30; # in seconds
open PASSWORD, $PASSWORD or die "Cannot open $PASSWORD: $!\n";
while (<PASSWORD>) {
# user:password:day:month:year:hours:minutes:seconds
my($u,$p,$D,$M,$Y,$h,$m,$s) = split /:/;
$M -= 1;
$Y -= 1900;
print $u if (time - timelocal($s,$m,$h,$D,$M,$Y)) > $DAYS;
}