in reply to command prompt help

I gather that you're not using CGI.pm, then, since that first syntax you tried didn't work... if you were using CGI.pm, it would have worked.
#!/usr/local/bin/perl -w use strict; use CGI; my $q = new CGI; print map $_ . " => " . $q->param($_) . "\n", $q->param;
See:
% foo.cgi foo=bar baz=quux foo => bar baz => quux
So use CGI.pm. The alternative is to write your own code to emulate a CGI environment, reading parameters either from @ARGV or from STDIN. All of which work has already been done in CGI.pm.