I have a script which can be called with a couple of options in the URL query field of the script (after the "?"
so there's a couple of lines in the script with along these lines...
Which checks the query, and if the url is myscript.cgi?average then it runs the average subroutine.
Now - I want to change the script so the query line can be something along the lines of myscript.cgi?average&s=6&f=10 - and my subroutine will still run, and I can get the values of s and f
I'm interested to find out what is the best/cleanest way of carrying this out.
Thanks in advance
Code:
elsif ($ENV{'QUERY_STRING'} eq "average") {&average;}
Which checks the query, and if the url is myscript.cgi?average then it runs the average subroutine.
Now - I want to change the script so the query line can be something along the lines of myscript.cgi?average&s=6&f=10 - and my subroutine will still run, and I can get the values of s and f
I'm interested to find out what is the best/cleanest way of carrying this out.
Thanks in advance