Help for this page

Select Code to Download


  1. or download this
    my @array = (1, 2, 3, 4);
    my $val = 0;
    ...
        $val |= $array[$i]<<(8*$i);
    }
    printf "%d\n", $val;
    
  2. or download this
    perl -e 'printf "%d\n", (4<<24)+(3<<16)+(2<<8)+1')