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 (Saint) on Oct 25, 2013 at 14:25 UTC
    > Where could I learn something about this string?

    You either type "perldoc -fprintf" 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)