Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: open com port list

by BrowserUk (Patriarch)
on Feb 05, 2010 at 17:31 UTC ( [id://821616]=note: print w/replies, xml ) Need Help??


in reply to open com port list

You could try:

#! perl -slw use strict; use Data::Dumper; use DBI; my $dbh = DBI->connect('dbi:WMI:'); my $sth = $dbh->prepare(<<WQL); SELECT * FROM Win32_SerialPort WQL $sth->execute(); while (my( $serial ) = $sth->fetchrow) { print Dumper $serial; }

I can't confirm if it works, because I just discovered that this machine doesn't have any serial ports!

I guess if I ever need one, I'd have to buy a USB-serial adapter.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://821616]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-18 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found