in reply to Simple regex wordlist question

Here's how I would do it, with just a modification of your regex.

use strict; use warnings; my $input = <STDIN>; chomp $input; my $file = 'wordlist.txt'; open(INFO, $file); my @lines = <INFO>; close(INFO); for my $word (@lines){ if ($word =~ /^[$input]+$/){ print "$word\n"; } }

Udate: I may have misinterpreted the OP. This obviously will not work if all six input characters must be used.