Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^6: getting error while writing to a table

by learner@perl (Novice)
on Jul 03, 2013 at 10:14 UTC ( [id://1042197]=note: print w/replies, xml ) Need Help??


in reply to Re^5: getting error while writing to a table
in thread getting error while writing to a table

Hi, where you want me to use print dd(\%input), when i use the print dd(\%input);i am, what i understood is use about use Data::Dumper; is by using perl module we can print the data structure of array/hash, can you please guide where you want me to dd\%input

  • Comment on Re^6: getting error while writing to a table

Replies are listed 'Best First'.
Re^7: getting error while writing to a table
by Anonymous Monk on Jul 03, 2013 at 10:27 UTC
    Right before foreach my $k (keys %input) {

    Then do the same for @data right before for my $i ( 0 .. $#data ) {

      Hi,
      my @values; my $table; foreach my $k (sort {$b <=> $a} keys %input) { foreach (@{$input{$k}}) { chomp(); push( @{@data[$.]},( split /[,\n]/, $_)); } } print "After\n"; print Dumper(\%data); for my $i ( 0 .. $#data ) { $body .= "<tr>"; for ( @{@data[$i]}){ $body .= "<td>$_</td>\r\n"; } $body .= "</tr>"; } $body .= "</table>";

      I am getting Global symbol "%values" requires explicit package

        Hi,

        Before

        $VAR1 = '12'; $VAR2 = [ '01-01-1989,ABC,12,12000,300000,Finanance,BC' 'January,60000' ]; $VAR3 = '13'; $VAR4 = [ '01-01-1988,BCH,13,15000,400000,Manfacturing,CB' 'Feburary,400000' ]; Can't use an undefined value as an ARRAY reference at

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1042197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-16 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found