TGI has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (strings)
It seems that chr() and pack("C",hex($1)) do the same thing, namely convert a number into a character (from it's ASCII value). Is there an advantage to using one over the other? I've seen the pack approach used in several scripts, but never the chr form? Is something wrong with using chr?
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What's the difference between chr() and pack('C', hex($1))?⭐
by Fastolfe (Vicar) on Oct 18, 2000 at 22:55 UTC |
Back to
Seekers of Perl Wisdom