Brady Jacksan wrote:
> I am writing a script that will read from a file named myfiles not
> stdin and print the lines containing the following words "everywhere"
> or 'nowhere.
>
>
>
> #!/usr/bin/perl
> #use strict
> while (<>) {
> chomp;
> if (/^everywhere$|^nowhere$/)
> print
>
> }
>
> How do I invoked the file myfiles at the beginning of the script? Any
> help is appreciated.
use strict;
@ARGV = 'myfiles';
while (<>) { print if /(every|no)where/ }
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]