On 8/7/06, john wright <[EMAIL PROTECTED]> wrote:
Hi, Can anyone explain me about below line of code,what will be the output,when i am running this code,i am not getting any output. $val=0x2964; pack ("n", $val);
What output are you expecting? pack doesn't produce output on it's own. If you had use warnings you would have gotten a message about "useless use of pack in a void context" #!/usr/bin/perl use warnings; use strict; my $val = 0x2964; my $val2 = pack ("n", $val); print "$val2\n"; my $val3 = unpack "n", $val2; print "$val3\n"; printf "%x\n", $val3; HTH, --jay -------------------------------------------------- This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] private and confidential daggerquill [at] gmail [dot] com http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org values of β will give rise to dom!