in reply to Searching Line by Line Multiple Times

Hi Dr.Avocado,

Another suggestion for simplifying code ...

Instead of:

my @suits = ("hearts","clubs","spades","diamonds");

You may find qw useful:

my @suits = qw(hearts clubs spades diamonds);

I've often found qw to be a big help in writing one-time use (ie. "throwaway") code, when applying one or more algorithms to a set of files:

use strict; use warnings; # Set @files to the result of doing something like # "ls -1" in Linux, or DIR/b in Windows (DOS) # my @files = qw( a.txt b.txt c.txt d.txt e.txt f.txt ); foreach (@files) { do_something_with_this_file($_); }

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/