in reply to Command line args

Why are you not using Getopt::Std or Getopt::Long? They make life (well, command line args anyway) much easier :-)

Update:I (now) realize he's only passing one argument and wants to read STDIN, but I would still prefer to use one of the Getopt modules, which would still allow use of '<>', and allow mixing file names with STDIN (when you use '-' as a filename arg).

Update2:Okay, sounds like there's probably good reason to use 'STDIN' in this case, nice that perl makes it easy :)

Replies are listed 'Best First'.
Re: Re: Command line args
by iamcal (Friar) on Jun 06, 2001 at 19:21 UTC
    Thanks, but i'm just passing a single string on the command line. I was being a muppet and confusing <> with <STDIN>