From 47be57c9c075d029ca9b63bc93658fdc9c97112b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 29 Jan 2012 13:44:49 +0100 Subject: [PATCH] specify port at command line --- at-chat.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/at-chat.pl b/at-chat.pl index 0fc9411..37fa988 100755 --- a/at-chat.pl +++ b/at-chat.pl @@ -5,7 +5,7 @@ use strict; use Device::SerialPort; use Data::Dump qw(dump); -my $device = $ENV{DEVICE} || '/dev/ttyUSB0'; +my $device = $ENV{DEVICE} || shift @ARGV || '/dev/ttyUSB0'; my $port = Device::SerialPort->new( $device ) || die "$device: $!"; $port->baudrate(115200) || die "fail $device baudrate"; -- 2.20.1