in reply to Faster Method for check function.

Hmmm... your subject line says "Faster Method", and your posting asks for "less lengthy way", which is not necessarily the same. As for the timing the alternatives, I leave it to you as an exercise. A less lengthy version would be

my $zipCheck=grep /\.zip\z/,@uploads; unless($zipCheck) { ... exit(0); }

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: Faster Method for check function.
by Karger78 (Beadle) on Jun 16, 2009 at 13:45 UTC
    Your correct, I ment less lenghty way :)
      I ment less lenghty way

      ... in which case we could further shorten the unless($zipcheck) by 3 characters to if(!$zipcheck)...

      -- 
      Ronald Fischer <ynnor@mm.st>
        and grep /\.zip\z/, @uploads could be grep /\.zip$/, @uploads for a savings of one, but now I think we're just splitting hairs =)