Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Strip first name from string

by hippo (Deacon)
on Jan 29, 2014 at 09:17 UTC ( #1072465=note: print w/ replies, xml ) Need Help??


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?


Comment on Re^3: Strip first name from string
Select or Download Code
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 (Priest) 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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-07-31 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls