in reply to Re^2: Strip first name from string
in thread Strip first name from string

While I understand what the fat commas are doing in there (I think), it's more perplexing why you used print sprintf instead of just printf. What am I missing here?

Replies are listed 'Best First'.
Re^4: Strip first name from string
by Anonymous Monk on Jan 29, 2014 at 09:37 UTC
    FWIW , usually, when one goes the more verbose route in posts, its to help the noobs, for example
    my $foo = sprintf ...; print "$foo\n";

    So  print sprintf ...

    Its kinda like using qq{} and q{} for oneliners --- makes the readers life more copy/paste and less editing :)

    Just my impression

Re^4: Strip first name from string
by 2teez (Vicar) on Jan 29, 2014 at 11:51 UTC

    hi hippo,
    ..it's more perplexing why you used print sprintf instead of just printf. What am I missing here?..

    Apart from printf doc. stating that printf and print sprintf(FORMAT, LIST) are equivalent. Atleast it's obvious from the usage of sprintf that one wants a formatted string.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me