hi,

        sorry to bother the list, but I'm stuck trying to convert this code
into something more elegant, using pack() ... 

my $commandlength = length $command;
my $high        = (($commandlength & (255 << 8)) >> 8);
my $low         = ($commandlength & 255);
my $commandstr  = sprintf("\002%c%c%c", $high, $low+1, scalar @arg -1) .
$command;

        the code is not mine, of course -- I don't know a drat about shifting
bits around--, its a rough conversion of some php code that we're using
in a module to administer qmail+vmailmgr via web-forms. the resulting
$command is going to be sent through a socket to a daemon that takes
care of administering the email server. 


        of course, if anyone is willing to tell me to RTFM and stop posting OT,
I'd be more than thankful if he/she includes a link to the FM (besides
perldoc, of course).




martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to