Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Parse mailing addresses with a regex

by CountZero (Bishop)
on Jun 23, 2003 at 15:15 UTC ( #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
Node Status?
node history
Node Type: note [id://268205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-03-05 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (109 votes). Check out past polls.

    Notices?