Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Simple but not elegant ?

by sundialsvc4 (Abbot)
on Jun 02, 2015 at 11:59 UTC ( [id://1128755]=note: print w/replies, xml ) Need Help??


in reply to Simple but not elegant ?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Simple but not elegant ?
by Anonymous Monk on Jun 02, 2015 at 12:46 UTC
    In the typical case of a line-by-line file, where the record "starts with" (or, "ends with") H00 or what-have-you, then I would suggest using the appropriate anchor characters: a caret "^" anchors the pattern to the beginning of the line; a dollar-sign "$" anchors to the end of the line.

    ^ and $ anchor to the beginning and end of the string, not line, unless the /m modifier is in effect (perlre). Even if you meant by "a line-by-line file" a file that is read one line at a time, your statement that they anchor to the ends of the line is potentially misleading.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found