Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
No such thing as a small change
 
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
Re^4: print a hash ref
by teamassociated (Novice) on Jul 09, 2013 at 14:39 UTC
    well its a lot of prints, 114 to be exact.
      So? You have to modify print only once.


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

      You should not have 114 prints.

      Try replacing them with a loop around a single print:

      print "$key : $hash{key}\n" for (keys %hash)

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 examining the Monastery: (7)
As of 2014-04-17 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (439 votes), past polls