Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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.

Replies are listed 'Best First'.
Re^4: print a hash ref
by teamassociated (Sexton) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043324]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-03-18 19:07 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.