Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl script to calacuate percentage statistics, does not display 0% in output

by Laurent_R (Canon)
on Dec 31, 2015 at 19:00 UTC ( [id://1151611]=note: print w/replies, xml ) Need Help??


in reply to Perl script to calacuate percentage statistics, does not display 0% in output

Perhaps you can assign 0 to undefined values. For example with something like this:
DB<2> $c[$_] = "def" for qw(3 5 6 8 9); DB<3> x \@c 0 ARRAY(0x600500c30) 0 empty slot 1 empty slot 2 empty slot 3 'def' 4 empty slot 5 'def' 6 'def' 7 empty slot 8 'def' 9 'def' DB<4> $c[$_] = $c[$_] // 0 for 0..9; DB<5> x \@c 0 ARRAY(0x600500c30) 0 0 1 0 2 0 3 'def' 4 0 5 'def' 6 'def' 7 0 8 'def' 9 'def' DB<6>
  • Comment on Re: Perl script to calacuate percentage statistics, does not display 0% in output
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found