in reply to search for '\' in perl

There's no backslash in your string, which is why it doesn't find one. If you use warnings (as you should, especially as a beginner), it gives you a clue:

$ perl -wE 'say "C:\username\Sources"' Unrecognized escape \S passed through at -e line 1. C:SernameSources

The \ in the double-quoted strings have a special meaning. Use double backslash to in ""-literals to produce a backslash in the string.