Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: print a hash ref

by nemesdani (Friar)
on Jul 09, 2013 at 14:14 UTC ( #1043324=note: print w/ replies, xml ) Need Help??


in reply to Re^2: print a hash ref
in thread print a hash ref

Not a nice way, but if it's only for printing, treat it like a number, e.g. add 0 to it and print the result.


I'm too lazy to be proud of being impatient.


Comment on Re^3: print a hash ref
Select or Download Code
Replies are listed 'Best First'.
Re^4: print a hash ref
by teamassociated (Acolyte) on Jul 09, 2013 at 14:39 UTC
    well its a lot of prints, 114 to be exact.

      You should not have 114 prints.

      Try replacing them with a loop around a single print:

      print "$key : $hash{key}\n" for (keys %hash)
      So? You have to modify print only once.


      I'm too lazy to be proud of being impatient.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2015-09-04 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (148 votes), past polls