#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; print 'Enter the password: '; chomp( my $password = <> ); if ($password =~ /^[\w\d@#\$%`~!^&*()_\-+={}[\]|\\'";:\/?.><,]{8}$/) { say "You're now authenticated."; } else{ say 'Please enter the correct password'; }