my $password = getpassword(); if ( crypt($password, "FO") ne "crypted password from one-liner") { #your code here }