... # FAILS $file = 'C:\tmp'; $regex = qr~C:\\tmp~; if ($file =~ m/$regex/i) { print "\nTest with backslashes -- If stmt is true...\n"; } #### Test with forward slashes -- If stmt is true... Test with backslashes -- If stmt is true...