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

Hi. I am using the above serial module and come across the 2 mentioned methods. Both seem to behave the same wrt inputting the characters from a COM port.

What is the difference between the 2 methods and where is there a decent play to get some documentation for the module as a whole and it's methods.?

Also, these methods seem to behave in a non-blocking manner. I would ideally like an input that blocks with a time-out option while it's waits for a line as input.?

Regards JC....

Replies are listed 'Best First'.
Re: Win32::SerialPort - Methods lookfor() and input()
by choroba (Cardinal) on Mar 30, 2025 at 16:16 UTC
    The documentation of the module can be found at the canonical page: MetaCPAN. It's a bit messy, probably because serial ports are messy. Both methods seem to be described there.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]