in reply to Re: Passing a variable to a module
in thread Passing a variable to a module

The resulting code is:
sub htmlHead { my $self = shift; # <------ my $title = shift; print $cgi->header("text/html"); print $title; print "<br>"; }

Replies are listed 'Best First'.
Re^3: Passing a variable to a module
by rich731 (Beadle) on Oct 31, 2008 at 10:54 UTC
    I actually ended up using:

    sub htmlHead { my $title = $_[1]; print $cgi->header("text/html"); print $title; print "<br>"; }

    Thank you both for your help
    Rich