in reply to Re^2: Read in a file containing the criteria for a program when it runs
in thread Read in a file containing the criteria for a program when it runs

In this example, I use __DATA__ section and read it with <DATA>. This way, all is included in one file.

But you will probably use an external file. To do that, just delete my $line = <DATA>; and while ($line = <DATA>) { (and __DATA__ section). Then uncomment the three lines.