Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Regexp Legibility

by patrickhaller (Initiate)
on Jun 14, 2009 at 05:21 UTC ( [id://771344]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $complex_re = /^($ip) ($host) ($msg)$/ if (
        $ip   = /\d+\.\d+\.\d+\.\d+/,
        $host = /[\-\.\w]+/,
        $msg  = /.*/
    );
    
  2. or download this
    my $complex_re = eval {
        my $ip   = qr/\d+\.\d+\.\d+\.\d+/;
    ...
    
        return /^($ip) ($host) ($msg)$/;
    );
    
  3. or download this
                     Rate    with eval without eval
    with eval    116279/s           --          -5%
    without eval 121951/s           5%           --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found