in reply to Re: 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

Awesome!! Quick question. Did you mean to comment out the three lines under my $line = <DATA>. If so, why? Thanks again. Much appreciated.

  • Comment on Re^2: Read in a file containing the criteria for a program when it runs

Replies are listed 'Best First'.
Re^3: Read in a file containing the criteria for a program when it runs
by brx (Pilgrim) on Jul 18, 2012 at 21:34 UTC

    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.