in reply to Re^2: Serial communication between perl and arduino
in thread Serial communication between perl and arduino

... can't open device: \.\COM22 ...

Notice the leading single backslash in the error message where a double backslash was advised. Even in single quoted strings, backslash interpolation is tricky:

c:\@Work\Perl\monks>perl -wMstrict -le "my $s = 'A: \\.\COM22'; print qq{'$s'}; ;; $s = 'B: \\\.\COM22'; print qq{'$s'}; " 'A: \.\COM22' 'B: \\.\COM22'


Give a man a fish:  <%-(-(-(-<