Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 =~ /\\/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943092]
help
Chatterbox?
[Discipulus]: LA something a little more perlish? @mts = map {qx!mp3info -p $_!} glob '/path/*.mp3 (hazarded code)
[Discipulus]: many monks want to be hired tonight, other haired and some aired
[Lady_Aleena]: Discipulus, do glob recurse?
[Lady_Aleena]: s/do/does/;
LanX wants to be fired
[Discipulus]: i fear no
[Discipulus]: i invented also 'gired'
[Lady_Aleena]: Discipulus, then that is a problem. I wanted to find total seconds of my entire .mp3 collection to do some math on it to see how many days of continuous music i have.
[LanX]: darn. .. I wanted to see Marine and Melonchon go to next round, just for fun xD

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-04-23 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.