On 2/27/06, Graeme McLaren <[EMAIL PROTECTED]> wrote: > Afternoon all, I want to change some repetitive code so its more dynamic, > basiaclly I want to replace the elsif statements below with one statement > which gets the number dynamically so I only need one if statement. > > Any ideas? snip
A lot depends on what $q is. There may be a better way to do what you are trying, but given the information you have provided, this is the best I can do for my $num (1 .. 5) { return "Delete AOC $num" if $q->param("delete_aoc$num.x"); } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>