John Whitney has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Perl to write to a series of serial ports. I have 20 ports, numbered COM1 ... COM20. I can write to ports COM1 ... COM9 just fine, but ports COM10 to COM20 generate the following error...

The system can not find the file specified. Can't open device COM10

The line it dies on is...
my $ob = Win32::SerialPort->new ('COM10') || die;
Any ideas?

Replies are listed 'Best First'.
Re: Com ports over COM9
by PodMaster (Abbot) on Nov 16, 2004 at 08:01 UTC
      Thank you so much! You saved me a lot of time.

      Ah, you gotta love good naming: "\\.\COM10"

      Thanks for the reference. I'm sure I'll run into this at some point!


      "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.


      OSUnderdog
A reply falls below the community's threshold of quality. You may see it by logging in.