#!/usr/bin/perl require 'sys/ioctl.ph'; require '_h2ph_pre.ph'; sub PCICARD_IOC_NUM () { ord('0'); } sub PCICARD_SET_REGISTER () { &_IOR( &PCICARD_IOC_NUM, 1, 'int' ); } sub PCICARD_GET_REGISTER () { &_IOW( &PCICARD_IOC_NUM, 2, 'int' ); } # Sanity check..... print "PCICARD_SET_REGISTER is %d\n", &PCICARD_SET_REGISTER; # you may need $value = pack 'C', 0x03 # as this will pack 0x03 into an unsigned 8 bit (char) value $value = 0x03; open(PCI, '+