sub has_num_and_char { my ( $str ) = @_; if ( $str !~ m/\d/xms ) { return; } if ( $str !~ m/[a-z]/xmsi ) { return; } return 1; }