Perl problem - COM ports and filehandles
oliver at cpan.org
Thu Feb 16 11:44:11 GMT 2012
> i am trying to convert a perl script from *nix to win32.
> 1) the unix script opens a filehandle to a device like this:
> open my $pipe, '+<', '/dev/ttyUSB0' or die "Couldn't open pipe for reading
> and writing";
When I wanted to use the serial port on Win32, I went another route...
Grab the plink.exe program (Google for PuTTY if you don't know it) and get
the params for that working so as to connect to the right port and baud
etc. Then, wrap this using Perl's IPC::Run module which should do all the
buffering etc that you want.
Seemed to work well enough for me.
hope this helps,
More information about the london.pm