in reply to Re^2: Calculations using values from two different hashes
in thread Calculations using values from two different hashes

Hello Marie oops.. Maire,

> Just to double check that I've understood everything here, does the "%.2f"..

This is covered under sprintf documentation, specifically in the paragraph "precision, or maximum width".

Anyway try it to see:

# pay attention to MSWin32 double quotes! perl -e "printf qq($_\n),3.141592 for '%f','%.0f','%.1f','%.2f'" 3.141592 3 3.1 3.14

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Calculations using values from two different hashes
by Maire (Scribe) on Nov 26, 2017 at 09:11 UTC
    Ah, thanks for the link and the example. I'm going to have a play about with that now, thanks!