Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: This is not a pipe

by thor (Priest)
on Mar 11, 2005 at 19:36 UTC ( [id://438770]=note: print w/replies, xml ) Need Help??


in reply to This is not a pipe

Wouldn't /^|$/ match a single pipe on a line with nothing else, answering the question "is this a pipe only?"

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

Replies are listed 'Best First'.
Re^2: This is not a pipe
by TGI (Parson) on Mar 11, 2005 at 19:53 UTC
    Yep, you are right, I can't type! I meant:
    /^[^|]$/;


    TGI says moo

Re^2: This is not a pipe
by Roy Johnson (Monsignor) on Mar 12, 2005 at 00:12 UTC
    It would match anything. It's an alternation, matching either start of string or end of string.

    Caution: Contents may have been coded under pressure.
      Right you are. I was supposing that this was one of those situations where the regex characters were taken literally, like if you were to do m/^{/;.

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-24 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found