If the code you're trying is the one you're showing us, taking a look at the error_log will probably tell you something along the line of Undefined subroutine redirect called at redirect.pl line 8 (and probably the same for the param() sub). To properly import the function interface from CGI.pm, you have to use CGI ':standard'; (or use CGI qw(:standard); as is often seen).
Then, you should use strict;, use warnings;, as well as redirect errors and warnings to your browser while developping with use CGI::Carp qw(fatalsToBrowser warningsToBrowser);. When setting your variable from the CGI parameter 'shop', you'd better do it as my $shop = lc(param('shop')). This has the advantage of standardizing the case, so to speak, as well as making $shop equal to the empty string in case param('shop') is undefined, avoiding some warnings with the following tests.
In reply to Re: Perl Redirect - Complete Perl Newbie
by Fang
in thread Perl Redirect - Complete Perl Newbie
by Tomster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |