Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: What would you put on a Perl mug?

by Perl Mouse (Chaplain)
on Oct 27, 2005 at 08:16 UTC ( [id://503273]=note: print w/replies, xml ) Need Help??


in reply to What would you put on a Perl mug?

Your mug design doesn't include the only regex thing I always need to look up: the difference between \Z and \z.

Anyway, if I were to put manual page snippets on a Perl mug, my vote would go for another mini-language: the pack/unpack templates.

But if I was asked to design a Perl mug, I'd include an onion and a white circle with a red edge, the word "Java" in the circle, and a red line through the circle. (aka "No Java"). (Not that I want to pick on Java, but that's the most well known language with a coffee theme).

I must admit that at work I use Java mug (happy 5th birthday), but strictly for tea. Coffee goes into my Sybase mug.

Perl --((8:>*

Replies are listed 'Best First'.
Re^2: What would you put on a Perl mug?
by jarich (Curate) on Oct 27, 2005 at 09:03 UTC

    Regarding \Z and \z. Now added. Thankyou for your suggestion.

    I didn't think about pack/unpack but that's because it's something I so rarely use. It's also less likely to have appeal to the Java, Python and PHP members of the conference audience, whereas (so far as I know) Perl's regular expression syntax ought to be useful to all of those members.

    A "No Java" message might get me into trouble, all things considered. ;)

    Thanks again for your suggestion.

    jarich

      I didn't think about pack/unpack but that's because it's something I so rarely use.
      That's exactly why I'd put it on a mug. Regular expressions is what people use all the time, and so they'll know most, if not all, of the syntax already. And since Perl regular expressions are firmly based on Henry Spencer's library, a lot of non-Perl users will not have problems with Perl regular expressions.

      OTOH, I don't use pack and unpack that often. That's why I need to look up its syntax when I do use it.

      Perl --((8:>*
      In that same vein (or in the vein where I have my coffee injected)...

      The things for which I'm always going back to "perldoc perlre" are:

      (?=) positive look-ahead (?!) negative look-ahead (?<=) positive look-behind (?<!) negative look-behind
      In fact, I had to look them up again just now, to make sure I posted them right. (Having done this, maybe I'll be able to use them from memory next time.) These really are tremendously useful, and it would be swell to have them visible on my desk at all times (except when I'm drinking my coffee, of course).

      I'm reluctant to suggest removing anything you have already, and I suppose you'd need to shrink the font if possible (and abbreviate "positive" and "negative") to make more stuff fit. If that were doable, and you ended up with enough room for just a couple more things besides "[pn].* look-.*d", you could add:

      \p{...} unicode class ... [:...:] posix class ...
      (not much detail there, admittedly, but just getting the terms "unicode" and "posix" onto the mug seems worthwhile).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found