On Mon, 18 Jun 2001 18:23:27 -0700, Bill Becker wrote:

>I always slap a
>
>   for ($a=0; $a<@ARGV; $a++) {
>     $fil = @ARGV[$a];
>     do some stuff with the files
>     }
>
>around it just in case there were multiple files/folders dropped on me.

In such a case, and if it matters, I like:

        while(@ARGV) {
            my $file = shift;
            open IN, $file or die "Cannot open file $file: $!";
            while(<IN>) {
                ...
            }
        }

-- 
        Bart.

Reply via email to