This perl fragment works as expected:
$x = 1234123444;
$y = $x >> 1;
print "$x $y\n";
1234123444 617061722
However when $x gets bigger things break:
$x = 2234123444;
$y = $x >> 1;
print "$x $y\n";
2234123444 1073741823
What I really wanted were two simple routines:
ip decimal dotted string <--> long int
and I came across the about problem. Surely this is
a no brainer...
openhaus% perl -v
This is perl, version 5.001
Unofficial patchlevel 1m.
running on a Solaris machine.
--
Russell P. Sutherland Voice: (416)-978-0470
Network Development Fax: (416)-978-6620
University of Toronto Email: russell.sutherland@utoronto.ca
Toronto, Ontario CANADA M5S 1A1
$x = 1234123444;
$y = $x >> 1;
print "$x $y\n";
1234123444 617061722
However when $x gets bigger things break:
$x = 2234123444;
$y = $x >> 1;
print "$x $y\n";
2234123444 1073741823
What I really wanted were two simple routines:
ip decimal dotted string <--> long int
and I came across the about problem. Surely this is
a no brainer...
openhaus% perl -v
This is perl, version 5.001
Unofficial patchlevel 1m.
running on a Solaris machine.
--
Russell P. Sutherland Voice: (416)-978-0470
Network Development Fax: (416)-978-6620
University of Toronto Email: russell.sutherland@utoronto.ca
Toronto, Ontario CANADA M5S 1A1