in reply to Re: How to get system -function negative return value?
in thread How to get system -function negative return value?

Thanks, but I exactly ment already divided value :-(

Code:

my $return_value = system("test.exe something");
returns 0-65280, negative value is always 65280

and when divide it

$return_value = $return_value/256;
it returns naturally 0-255

Maybe I should use some other function. Any suggestions?

Replies are listed 'Best First'.
Re: How to get system -function negative return value?
by Abigail-II (Bishop) on May 27, 2004 at 09:42 UTC
    As I said in another post:
    $ perl -wle 'print unpack c => pack C => 65280 >> 8' -1

    Abigail