Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: question regarding "v" flag of printf

by choroba (Canon)
on May 23, 2013 at 05:56 UTC ( #1034871=note: print w/ replies, xml ) Need Help??


in reply to question regarding "v" flag of printf

This works:

printf '<%vd>', pack 'c*', unpack '(A1)*', '123';
First, it splits the string into one-character strings (A1), it then replaces each with the number the character represents (c*), which makes it ready for your printf template.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: question regarding "v" flag of printf
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2015-07-29 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls