Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Regex simplification

by ehdonhon (Curate)
on Aug 26, 2002 at 04:39 UTC ( [id://192769]=note: print w/replies, xml ) Need Help??


in reply to [untitled node, ID 192753]

One thing that might speed up your code is to use a compiled regex:

my $search = qr/--\s*USER\s+\d+\s*-\s*(\w+)/; foreach $line (@site) { next unless ( $line =~ $search ); $user = $1; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found