in reply to Command line args

When arguments are sent to Perl, they're in the @ARGV array. When you read from <>, Perl treats the elements in @ARGV as though they were actually filenames.

Perhaps you want to force a read from STDIN, or else remove the elements from @ARGV (locally, perhaps).
while (<STDIN>) { ... } # or { local @ARGV; while (<>) { ... } }


japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Command line args
by iamcal (Friar) on Jun 06, 2001 at 19:17 UTC
    Excellent - that was the problem. Using <> when i should have been using <STDIN>.