CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [tanmay] Perl report format and references to hash is creating header issues in 11g(perl version 5.10.0) but fine in 10g(perl version 5.8.4): Edit Log



FishMonger
Veteran / Moderator

May 27, 2015, 6:56 AM


Views: 31925
Re: [tanmay] Perl report format and references to hash is creating header issues in 11g(perl version 5.10.0) but fine in 10g(perl version 5.8.4)

Did you load the strict and warnings pragmas? i.e.,

Code
use strict; 
use warnings;


Your subroutine is missing the sub keyword. Is that really how you have it in the script, or did you just forget to include it when you wrote this post?


Code
($c, $cntpag)=$_;

Is that really how you have that in the script?

$_ is a scalar which you are attempting to use to assign a list. Arguments passed into a subroutine are in the @_ array, not the $_ scalar. That mistake alone may be the cause of your problem.

The preferred method to dereference a hash or array ref is to use arrow notation which adds a little more visual clarity.

Code
sub WritePageHeader {  
my ($c,$cntpag) = @_;
my $tblrep = $c->{tabl_rpt()}->data();
my $tblreprndata = $c->{tabl_rpt_run_dat()}->data();


Your sub is assigning $cntpag but never uses it. Why?


(This post was edited by FishMonger on May 27, 2015, 6:57 AM)


Edit Log:
Post edited by FishMonger (Veteran) on May 27, 2015, 6:57 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives