Simple password dictionary attack script
Performance

For each cipher, you re-read and re-encrypt the dictionary again and again. If some of your ciphers have the same length, then this is wasteful. At the minimum, you should load the dictionary only once. If you have a lot of passwords, then you could pre-encrypt all words in the dictionary for each unique factor. That should speed things up.

Coding style

You could simplify this if condition:


if (($factor == 56) ||
      ($factor == 64) ||
      ($factor == 96) ||
      ($factor == 128))
{ ... }



by using a helper function, perhaps something like this:

sub one_of {
    my $value = shift;
    for (@_) { return 1 if $_ eq $value; }
}
# ...
if (&amp;one_of($factor, 56, 64, 96, 128)) { ... }




This can be slightly simpler:


my @ciphers = &lt;$input&gt;;
# remove end of line characters
chomp(@ciphers);



like this:

chomp(my @ciphers = &lt;$input&gt;);


And then close($input) right after. It's good to close an input file immediately after you're done reading from it.



You could simplify $factor = $factor * 4; as $factor *= 4;



I think all your comments are pointless. You can remove them and let the code speak for itself. 

If the meaning of a variable is not clear enough without a comment, then try to rename it to be self-explanatory. Note that the variable will be self-explanatory every time you use it, whereas a comment only explains it in once place.

Likewise, you can extract non-trivial logic to a function with a name that explains what it does. For example:

sub get_factor {
    my $cipher = shift;
    my $factor = length($cipher);
    if ($factor == 40) {
        return 1;
    } elsif (&amp;one_of($factor, 56, 64, 96, 128)) {
        return $factor * 4;
    }
}

foreach my $cipher(@ciphers) {
    # ...
    my $factor = &amp;get_factor($cipher) || next;
    # ...
}