format output readable
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 12 Oct 2016 16:38:49 +0000 (18:38 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 12 Oct 2016 16:38:49 +0000 (18:38 +0200)
serial.pl

index e72c99a..6620593 100755 (executable)
--- a/serial.pl
+++ b/serial.pl
@@ -23,7 +23,7 @@ while (1) {
        if ( $len > 0 ) {
                my $hex = unpack('H*',$string);
                $hex =~ s/(..)/$1 /g;
-               print time(), " $len $hex\n";
+               printf "%s %2d  %s\n", time(), $len, $hex;
        }
 }