in reply to Multiple routes that execute the same action

Interesting problem. From the old basic CGI module, you can easily dump all your input parameters into a hash, then you would need to do some logic on the hash keys to send certain inputs to the same subroutine.
my %input= $cgi->Vars(); foreach $name (keys %input){ $value = $input{$name}; } #now test for conditions if ((-e $input{"whatever") && (-e $input{"wherever") ) { your subroutine goes here } # I may have missed some details involving autovification of hash keys +, # and grepping the %input hash keys may be better, but right now, # I'm not sure of the cleverest way to grep an array for 2 values. # I leave that to you, or a more clever monk than me.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^2: Multiple routes that execute the same action
by Anonymous Monk on Mar 28, 2014 at 18:24 UTC