What I'd really like to be added to Perl:
I'd like if there were a %C sprintf format that was like %g, but also did commafication on the integer part of the number(well, with a locale-specific thousands separator, so you get "." or " " as locale-appropriate). So I can just do printf "That file uses %C bytes.\n", -s $filename; and have it say, for example, That file uses 10,116,911 bytes.
(I know it would be a Good Thing if all of sprintf were rewritten to allow, say, overloading specific sprintf formats. But I see reason to wait for that. If I knew any C, I'd just have done this myself years ago and submitted the patch; but I don't know C.)
Another thing I'd really like:
I'd like if there were a file read-discipline that would auto-guess the encoding (at least as either UTF-8, UTF-16, or other), and also auto-guess the newline format.
For some reason, I'm in a particularly foul mood today, so I hereby threaten to put an ice-axe thru the forehead of anyone who wants to tell me that these things don't belong in the Perl core.
More Important (Score:2, Informative)
That said, %C seems like a decent idea to me, but it makes me think of what other formats we might want. Maybe a format for HTML encoding or URI encoding of a string?
What *I* would really like... (Score:0)
Occasionally I tinker with the notion of fork'ing some of my apps where I think I could get some extra speed, but then the reality of overhead hits me.
too many choices (Score:2, Insightful)
I think that it would be better for printf to check whether the value to be printed is an object which has a printf method. If it does, it gets called something like:
$val->printf( width, prec, format, flags )
That lets you roll your ow
Encoding Detection (Score:2)
But it really shouldn't go in perl core...