Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Add numbers row by row

by epimenidecretese (Acolyte)
on Oct 25, 2013 at 14:20 UTC ( #1059681=note: print w/replies, xml ) Need Help??


in reply to Re: Add numbers row by row
in thread Add numbers row by row

Thank you very much! Works great. Where could I learn something about this string?
printf "%-5d %s\n", $tot, $date;
I don't really understand what's going on.

One of Crete's own prophets has said it: 'Cretans are always liars, evil brutes, lazy gluttons'.
He has surely told the truth.

Replies are listed 'Best First'.
Re^3: Add numbers row by row (perldoc)
by toolic (Bishop) on Oct 25, 2013 at 14:26 UTC
    You're welcome.
    Where could I learn something about this string?

    In a variety of places:

    • The "Function Nodelet", which is on the right side near the bottom of the page of my browser here at the Monastery, has a link to the printf docs. I'm not sure if this nodelet is enabled by default.
    • The official documentation is online: printf
    • And it is also at your command prompt: perldoc -f printf
Re^3: Add numbers row by row
by LanX (Archbishop) on Oct 25, 2013 at 14:25 UTC
    > Where could I learn something about this string?

    You either type "perldoc -f printf" or sprintf into your console ...

    ... or you check the online docs at http://perldoc.perl.org (but beware of the Perl version)

    It's also searchable per "duckduckgo: perl printf" or "google: perl printf" or other search machines...

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2019-12-12 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?