The line if($_ = /\\/) is probably not doing what you want it to do. Either you mean if($_ =~ m/\\/) which would mean "if it contains '\'", or you mean if($_ eq '\') which would mean "if it is '\'".
if($_ = /\\/) is attempting to assign something to $_, and testing if the assignment succeed. Probably not what you want.
In reply to Re: search for '\' in perl
by DStaal
in thread search for '\' in perl
by kumeperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |