Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: In-place file filtering

by flounder99 (Friar)
on Jul 24, 2003 at 20:28 UTC ( #277680=note: print w/replies, xml ) Need Help??

in reply to In-place file filtering

AMEN to what RMGir said. Anyway here is my stab at it.
perl -ni.bak -e '/^\d+\t(\d{5})/&&$1>713&&$1<99930?print:warn $_' *.da +t



Replies are listed 'Best First'.
Re: Re: In-place file filtering
by dragonchild (Archbishop) on Jul 24, 2003 at 20:40 UTC
    I'd change that to:
    The reason being that your code will pass 072300 as a valid zip code when it's obviously not.

    Now - I just thought of this: Only Zip5 will be allowed. Zip5+4 is not possible? If it is, change that regex to:


    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2019-01-16 01:20 GMT
Find Nodes?
    Voting Booth?
    After Perl5, I'm mostly interested in:

    Results (273 votes). Check out past polls.