c:\@Work\Perl\monks>perl -wMstrict -le "for my $path ( 'scp', 'sss40s1u01:/home/example/test.txt', '/home/example/testdir', @ARGV, ) { print qq{'$path' matches} if $path =~ /^\//; } " "/any" "/other/examples" '/home/example/testdir' matches '/any' matches '/other/examples' matches