Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: search for '\' in perl

by tinita (Parson)
on Dec 12, 2011 at 14:11 UTC ( #943092=note: print w/ replies, xml ) Need Help??


in reply to search for '\' in perl

please read perlintro, Modern Perl and/or one of the other tutorials. you're doing wrong almost everything what could possibly go wrong =)

you are not using warnings and strict.
the element in @List will contain the string "C:SernameSources".
you are trying to use $_ but $arrchar is the variable you want to do the matching on.
by saying $_ = /.../ you are assigning to $_. you have to say $arrchar =~ /\\/


Comment on Re: search for '\' in perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-12-21 16:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls