in reply to Passing variables via internet links

In php it's http://www.perlmonks.org/test.php?id=1 in order to pass the variable $id=1 to the test.php program. This doesn't work in perl as far as I can tell. Is there a similar method.
and this is good!
image you have a $very_important_variable in your script and someone passes very_important_variable=foo to your script.
or you have $file_to_print and someone passes file_to_print=/etc/passwd or something like this.