Anyone know if this is possible?
The situation::
Basically I am trying to push a variable and a hash into
a subroutine. Look at the code below.
---------------------------------------------------------------------------------------
#!/usr/bin/perl
&whatever("template.tt2", \%tt_hash);
sub whatever {
my ($temp_file, %tt_hash) = @_; #---->> I know this doesn't work
my $template = Template->new();
$template->process($temp_file, \%tt_hash)
|| die "Template process failed: ", $template->error(), "\n";
}
The situation::
Basically I am trying to push a variable and a hash into
a subroutine. Look at the code below.
---------------------------------------------------------------------------------------
#!/usr/bin/perl
&whatever("template.tt2", \%tt_hash);
sub whatever {
my ($temp_file, %tt_hash) = @_; #---->> I know this doesn't work
my $template = Template->new();
$template->process($temp_file, \%tt_hash)
|| die "Template process failed: ", $template->error(), "\n";
}