Minor clean-up

This commit is contained in:
swagg boi 2021-03-05 22:31:48 -05:00
parent b646f11378
commit 7666030990

View file

@ -55,7 +55,7 @@ get '/ula6' => sub {
$halftwo = "fe" . $fields[3] . $fields[4] . $fields[5]; $halftwo = "fe" . $fields[3] . $fields[4] . $fields[5];
$binfield = sprintf "%b", hex $fields[0]; $binfield = sprintf "%b", hex $fields[0];
$decfield = sprintf "%d", 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; $binfield = sprintf "%b", int $decfield;
$hexfield = sprintf "%x", int $decfield; $hexfield = sprintf "%x", int $decfield;
$halfone = $hexfield . $fields[1] . $fields[2] . "ff"; $halfone = $hexfield . $fields[1] . $fields[2] . "ff";
@ -66,7 +66,7 @@ get '/ula6' => sub {
# Cat with the time # Cat with the time
$digesty = sha1_hex($epoch . $fulleui); $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 # Set the ULA
$ula6 = $uniqueid . ':/48'; $ula6 = $uniqueid . ':/48';