#!usr/bin/perl use strict; use warnings; print("Enter the password:"); $password=<>; @pw=split('',$password); $size=@pw; if($size==9){ if($password=~m/\w+\d+\@|#|\$|%|\\|\//i) { print("you're now authenticated\n"); } else{ print("Please enter the correct password\n"); } }