#!/afs/athena/contrib/perl/perl

open(UTMP, "/var/adm/wtmp");

$/='';
$utmp = <UTMP>;
print("Utmp: $utmp\n");
for $n (0..300)
{
    printf("Substr is: %s\n", substr($utmp,$n*33,33));
unpack("a8$foo a8$bar a16$baz l$quux", substr($utmp,$n*33,33));
print("$foo $bar ($baz) $quux\n");
}
