@list = "C:\username\Sources"; foreach $arrchar (@list) { print "array char = $arrchar"; if($_ = /\\/) { print "\nfound one \n"; } }