i am new to perl programming. i am trying to write a program to find number of occurence of '\' in an array [file path]. I tried the follwing code,
Expand|Select|Wrap|Line Numbers
- @list = "C:\username\Sources"
- foreach $arrchar (@list)
- {
- print "array char = $arrchar";
- if($_ = /\\/)
- {
- print "\nfound one \n";
- }
- }
but errors = 0
please excuse my ignorance if my code is wrong.
Reading the manual is confusing me further.. can anyone please help me with the code?
Thanks,
Kumeperl