On 2014-01-07, Jurjen Oskam <jur...@osk.am> wrote: > open(METER,"/dev/ttyUSB0") or die; > while(<METER>) { > # do stuff > done
http://www.jibble.org/currentcost/ uses Device::SerialPort (p5-Device-SerialPort-1.04p0v0 in packages) to setup the serial port from perl. This might be easier than wrapping your perl script in a shell script.