in reply to Use 'param' in if statement.

To expand on injunjoel's reply, try:

use CGI; my $query = new CGI; if ($query->param("item") eq "select") { &retrieve_data; } elsif ($query->param("item") eq "update") { &update_data; } sub retrieve_data {

That should do it. It's one of those crazy bugs that we have all stared at for hours and simply not seen the obvious. Take heart, we've all been there.


—Brad
"Don't ever take a fence down until you know the reason it was put up." G. K. Chesterton