Sys::PortIO - perform direct port I/O from Perl
use Sys::PortIO; port_open($portnum); write_byte($portnum, $value); $value = read_byte($portnum); port_close($portnum);
This module provides a Perl interface to the low-level port I/O operations provided by Linux, FreeBSD, or OpenBSD. Among other things, this is useful for writing Perl scripts that interface with parallel, serial, or joystick ports.
On some systems (for example, Linux), doing a port read or write on an unopened port will cause a segmentation fault.
port_open()
Linux I/O port mini-HOWTO: http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html
On Linux or other glibc systems, see ioperm(2), inb(2), and outb(2). FreeBSD uses /dev/io for port access. On OpenBSD and NetBSD, see i386_iopl(2) and sysarch(2).
Andrew Ho, <andrew@zeuscat.com>
Copyright (C) 2005 by Andrew Ho.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6.0 or, at your option, any later version of Perl 5 you may have available.
To install Sys::PortIO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sys::PortIO
CPAN shell
perl -MCPAN -e shell install Sys::PortIO
For more information on module installation, please visit the detailed CPAN module installation guide.