#!/usr/bin/perl
# REQUIRES ONE ARGUMENT == to the ibus you want to read/write to.

while (1){
open IBUS, "+>$ARGV[0]"  || die "Can't open $ARGV[0]: $!\n";
read IBUS, $inport, 1;

print IBUS $inport;

close IBUS;
printf "Value returned from port: 0x%.2lx\n", unpack "C", $inport;
}
exit 0;

