in reply to Faster Method for check function.

$uCount is totally useless. For/foreach aliases $_ to each element of the array.

my $zipCheck; for (@uploads) { if (/\.zip\z/) { ++$zipCheck; last; } } die "There were no zip files\n" if !$zipCheck;

Replies are listed 'Best First'.
Re^2: Faster Method for check function.
by rovf (Priest) on Jun 16, 2009 at 14:13 UTC
    $uCount is totally useless.

    plus, it was uninitialized, so I wonder whether the original code worked in the first place...

    -- 
    Ronald Fischer <ynnor@mm.st>
      It would have worked, but it would have issued a warning