Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Parse mailing addresses with a regex

by CountZero (Bishop)
on Jun 23, 2003 at 15:15 UTC ( [id://268205]=note: print w/replies, xml ) Need Help??


in reply to Parse mailing addresses with a regex

Slightly off-topic: rather than reading the file as a whole into an array and then going through the array, it is far less memory and resources-consuming (not to say more elegant) to read the file line by line and immediately handle each record as soon as it is read in.

while <CUSTOMERFILE> { # YOUR REGEX AND OTHER THINGS HERE # Note: record just read is in $_ ; works nice with m// }

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-24 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found