I'm not sure if this should have been posted to the perl forum, but it's links related so here goes...
Being (very) rusty with perl, can anyone explain to me how to pass a links $rec information to a sub routine along with $in and $dynamic? The last call here works further up the script and everything gets passed through ok. But when trying to pass the $rec information to this sub routine, I'm getting this error message....
Can't use an undefined value as a HASH reference at .../cgi-bin/recommend_it.cgi line 115*.
I know there's a simple answer just waiting to make me look stupid - so fire away.
$rec <-- link information grabbed from database.
if ( $ENV{'REQUEST_METHOD'} eq "POST") { ## If the script has been called from a form, process it.
## PASS THE HASH THE REFERRING PAGE VARIABLE
$rec->{'jumpback'} = $in->param('jumpback'); ## Add jump back info to the link hash.
&process_form ($in, $dynamic, $rec);
}
sub process_form {
# --------------------------------------------------------
my ($in, $dynamic, $rec) = @_;
## Call a sub routine in httmtemplate file, and pass the $rec informaion through to the template again.
&site_html_recommend ({ error => "Sorry an error occurred", %in, %$rec }, $dynamic) and return; #* line 115
}