Another way to write that:
sub test_if_letters_are_included { # Ask for input say 'Which letters would you like to use?:'; # Capture user input my $input = <STDIN>; # create a character set of input letters my $chars = uc join '', $input =~ /[[:alpha:]]/g; @list_words = grep /[$chars]/, @list_words; }
In reply to Re^3: Bizarre Perl behavior?
by jwkrahn
in thread Bizarre Perl behavior?
by Polymathic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |