Public feed #528318

Mike

public text v1 · immutable
Raw Edit
·published 2007-06-01 14:41 UTC
rendered paste body
#!/usr/local/bin/perl
use POSIX;

# put it in the "@in" array; do the math operation as we read
while (<>) {
    push @in, int($_ / 16);
}

# while we have at least 2 items, print a pair
while (@in > 1) {
    print shift(@in), " ", shift(@in), "\n";
}

# if we read an odd number, print the final number
if (@in) {
    print $in[0], "\n";
}