kumeperl has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
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,
but it was not working, i mean it is not printng "found one". 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?@list = "C:\username\Sources"; foreach $arrchar (@list) { print "array char = $arrchar"; if($_ = /\\/) { print "\nfound one \n"; } }
Thanks,
Kumeperl
Back to
Seekers of Perl Wisdom