in reply to Using form return value as subroutine name

Hello phirun

generally speaking... never trust user input!! :)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Using form return value as subroutine name
by perlfan (Parson) on Jul 15, 2021 at 14:41 UTC
    AnomalousMonk's solution generally solves this issue by creating an effective white list of acceptible keys, checked ahead of time with a simple exists or defined.