meetn2veg has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (subroutines)
Is this possible? Is there an easier/more efficient way?
A slightly longer version:
data file contains the following:
main_menu:1:1 'main_menu' is the name of the subroutine 1:1 refers to screen position(0=left 1=right) and hide/display.
This data is read by sub build_menus. Simply using 'if' statements, a series of menu 'blocks' are built up to be displayed on screen.
I had been using static files with straight HTML, but nor wequire that the links which are built dynamically contain other veriables appended to the URL (eg: $language, $menu_option, etc...) and am thinking of using a sub routine to build the URLs - rather than using a substitution script to parse the URL after it's been built.
Hope this helps so that someone can help me.
Kind regards from Andorra
Richard.
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: calling a sub using its name assigned to a variable ?⭐
by NetWallah (Canon) on Jul 21, 2003 at 05:28 UTC | |
Re: calling a sub using its name assigned to a variable ?
by jryan (Vicar) on Jul 21, 2003 at 20:38 UTC |