in reply to Re: about while() combine with ARGV
in thread about while() combine with ARGV

I'm a big fan of using shift for taking command line arguments. This way, they get assingned in the order that they were passed in. Just one less thing to debug.

thor

Replies are listed 'Best First'.
Re: Re: Re: about while() combine with ARGV
by japhy (Canon) on Feb 19, 2002 at 14:00 UTC
    Except that since the first element of @ARGV is the one he wants to keep, he'd have to then put it back somehow.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      perhaps unshift? or maybe pop the arguments off in the first place... TMTOWTDI!

      ~Particle