Minor clean-up
This commit is contained in:
parent
b646f11378
commit
7666030990
|
@ -55,7 +55,7 @@ get '/ula6' => sub {
|
|||
$halftwo = "fe" . $fields[3] . $fields[4] . $fields[5];
|
||||
$binfield = sprintf "%b", hex $fields[0];
|
||||
$decfield = sprintf "%d", hex $fields[0];
|
||||
$decfield = ($binfield =~ m/1[01]$/) ? $decfield - 2 : $decfield + 2;
|
||||
$decfield = ($binfield =~ /1[01]$/) ? $decfield - 2 : $decfield + 2;
|
||||
$binfield = sprintf "%b", int $decfield;
|
||||
$hexfield = sprintf "%x", int $decfield;
|
||||
$halfone = $hexfield . $fields[1] . $fields[2] . "ff";
|
||||
|
@ -66,7 +66,7 @@ get '/ula6' => sub {
|
|||
|
||||
# Cat with the time
|
||||
$digesty = sha1_hex($epoch . $fulleui);
|
||||
($uniqueid = "fd" . substr $digesty, -10) =~ s/(.{1,4})/$1:/gs;
|
||||
($uniqueid = "fd" . substr $digesty, -10) =~ s/(.{1,4})/$1:/g;
|
||||
|
||||
# Set the ULA
|
||||
$ula6 = $uniqueid . ':/48';
|
||||
|
|
Loading…
Reference in a new issue