Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: I don't use printf enough

by jdtoronto (Prior)
on Oct 22, 2003 at 18:14 UTC ( #301309=note: print w/ replies, xml ) Need Help??


in reply to I don't use printf enough

Which, for me, raises an interesting point.

I have NEVER used printf in Perl! I think that I cam to hate them with such vehemence, ferocity and vitriol in C that my brain now fails to admint their very existence. Do you get the idea that I didn't enjoy my experience writing 'C'? I was actually brainless enough to write a lot of stuff in 'C' during the 80's. I think I know why I have a full head of grey hair now. In fact, it may have been easier to do it in Z80 assembler (I was working with Micromation multi-processor machines with Z-80's, MC6809's or 80186's!)

Maybe I might look at them in Perl? But then maybe not, I like concatenation operators :)

jdtoronto


Comment on Re: I don't use printf enough
Re: Re: I don't use printf enough
by dragonchild (Archbishop) on Oct 22, 2003 at 18:23 UTC
    I agree completely. The only reason I ever use printf and sprintf in Perl is to create fixed-width files, especially ones with left-padding.

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: Re: I don't use printf enough
by bunnyman (Hermit) on Oct 23, 2003 at 15:10 UTC

    I find sprintf is still the best way to convert numbers into hex format, and printf is a good way to get columns of text that all line up.

    Other than that, print is just as good, and you don't have to remember all those format letters to use it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2014-07-14 14:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (263 votes), past polls