Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: This is not a pipe

by thor (Priest)
on Mar 11, 2005 at 19:36 UTC ( #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
Node Status?
node history
Node Type: note [id://438770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2019-04-21 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (110 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!