in reply to Re: Re: Shortening long and dirty code
in thread Shortening long and dirty code

No need to keep the ifs. Do it in a loop:

foreach my $i (1 .. 4) { call_sub( param("upload$i") ); }

The code in the subroutine would basically be what is now in your if statements.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated