Re: perl pack function

2002-06-25 Thread Philip Newton
On Tue, 25 Jun 2002 16:19:05 +, [EMAIL PROTECTED] (Imran Khan) wrote: > Q: Does pack have to take a deminal integer - or can i somehow pass a hex > value to it? > ie something like: my $tmp_char= pack("U", 263A); pack('U') takes an integer. You can specify that integer in several ways, just

perl pack function

2002-06-25 Thread michael monaghan
my $foo = pack("U", 9786);# gives the WHITE SMILING FACE character

perl pack function

2002-06-25 Thread Imran Khan
Hi, if i do the following: my $tmp_char= pack("U", 9786); #9786 is the decimal equivalent of the hex: 263A then $tmp_char now contains the Unicode character "WHITE SMILING FACE" Q: Does pack have to take a deminal integer - or can i somehow pass a hex value to it? ie something like: my $tmp_ch