Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Modern Perl: The Book: The Draft

by hbm (Hermit)
on Sep 21, 2010 at 18:44 UTC ( #861131=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
        # a poor regex
        my $hot_meal = qr/hot.*meal/;
        say 'Found a hot meal!' if 'I have a hot meal' =~ $hot_meal;
        say 'Found a hot meal!'
             if 'I did some one-shot, piecemeal work!' =~ $hot_meal;
  2. or download this
        my $minimal_greedy_match = qr/hot.*?meal/;
  3. or download this
        say 'Found a hot meal' if 'ilikeahotmeal' =~ /$minimal_greedy_matc
  4. or download this
        my $minimal_greedy_at_least_one = qr/hot.+?meal/;
        unlike( 'ilikeahotmeal', $minimal_greedy_at_least_one );
        like( 'i like a hot meal', $minimal_greedy_at_least_one );
  5. or download this
        my $seven_down = qr/\Al${letters_only}{2}m\Z/;
  6. or download this
        my $seven_down = qr/\bl${letters_only}{2}m\b/;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://861131]
[atcroft]: stevieb: Also, one other odd question... is it possible to set it up so that all the versions installed can use a single directory that they pull module sources into, rather than duplicating files? (Am I making sense, or do I have too high a CBC
[atcroft]: (caffeine-blood content) atm?)
[atcroft]: .oO(Interesting... I just went to http://blogs.perl. org/, did a search for "Mars", and tried to go to the second page of results, and received instead a "Request-URI Too Large" message.... odd.)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2017-04-29 05:16 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.