Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: What the heck does this mean?

by vonman (Acolyte)
on Mar 13, 2001 at 01:34 UTC ( #63975=note: print w/ replies, xml ) Need Help??


in reply to What the heck does this mean?

I think what is happening is that the original code must not be displaying characters correctly on my machine. So what should I replace m and # with?


Comment on Re: What the heck does this mean?
Re: Re: What the heck does this mean?
by japhy (Canon) on Mar 13, 2001 at 01:36 UTC
    What are you talking about? m// is the pattern match operator, and you can use characters other than / for the delimiter. Thus, the code can be:
    /^coclli=(.*)/ # or m!^coclli=(.*)! # or m<^coclli=(.*)>
    Perl can be as eccentric as the programmers who use it.

    japhy -- Perl and Regex Hacker
Re: Re: What the heck does this mean?
by astanley (Beadle) on Mar 13, 2001 at 02:24 UTC
    perl allows you to specify any character as the regexp seperator. / is just a suggestion and I guess is most widely used? Either way the perldocs say you can use m## just as easy as m// if, for instance you wanted to match a string that had a lot of /'s in it and didn't want to \/ them all - m#///# would work and is a little easier to read than m/\/\/\//.
    Adam

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-12-26 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (176 votes), past polls