Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

* The regex metacharacter ^ means "start of string", not "start of line" (unless the /m modifier is used) * The regex metacharacter $ means "end of string", not "end of line" (unless the /m modifier is used)

Because "foo\n" =~ /foo$/, I tend to explain it differently. ^ and $ are begin and end of a line, but /m modifies the meaning of line. $ certainly is not end of string when the string ends in \n. I'm not sure if and how I want to change the sheet.

* . is "any char except \n" or just "not \n" (unless the /s modifier is used)

Good point, will be changed.

regex \A, \Z and \z

Maybe if I need to fill some room in a future version, but I kind of wanted to keep it simple. I also didn't include \G, \X, \C, \b, \B. I think I'd add \b and \C first.

* Another commonly ignored "NEVER" is: /$userinput/

Good one, but I'd need another line :). Will remember it for a future version, though. Update - Added valdez' link suggestion and a use Modules; et voila: a line to put /$userinput/ on!

Thanks for your input!

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.

In reply to Re: Re: Perl cheat sheet by Juerd
in thread Perl cheat sheet by Juerd

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-10-19 15:20 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (77 votes). Check out past polls.