in reply to Simplifying the following code
Given the choice, Fastolfe's method is the better way to go, but you could do ...
foreach my $file ( $file1, $file2, $file3, ... ) { push @tour_photos, $file if defined($file) && $file ne ''; }
As for the second part of your question, it was asked and answered in Variable Variables, but why do all that assignment when you can use param('var')?
--k.
|
|---|