in reply to SCALAR ref error help!

The qq function does interpolation so ${ is seen as dereferencing something that isn't defined.

You didn't mention the other warning "Subroutine menu redefined at call_b.pl line 9." I don't know anything about CGI or URI so not sure if that is an issue. But it looks like calling uri_escape is returning undef.

Something else I noticed is that my $go_menu = &menu; will not assign anything to $go_menu since menu doesn't return anything.

Replies are listed 'Best First'.
Re^2: SCALAR ref error help!
by Anonymous Monk on Aug 03, 2011 at 15:47 UTC
    What if I change the menu sub to:
    sub menu { $address = q| <td> <ul> <li><a href="home.pl?contatc=${ uri_escape( $address ) }&amp;s +elected_tab=a" target="_top">home<b></b></a></li> <li><a href="home.pl?contatc=${ uri_escape( $address ) }&amp;s +elected_tab=b" target="_top"><span></span>about<b></b></a></li> <li><a href="home.pl?contatc=${ uri_escape( $address ) }&amp;s +elected_tab=c" target="_top"><span></span>contact<b></b></a></li> + </ul> </td> |; return; } Suggestions? Or would that be ok to have this line then: <code>my $go_ +menu = &menu;

    Thanks! </code>