Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: accessing/printing specific rows in a flat file DB

by Cine (Friar)
on Aug 01, 2003 at 16:15 UTC ( #280029=note: print w/replies, xml ) Need Help??


in reply to accessing/printing specific rows in a flat file DB

Just filter when you are reading in your data.
open(INF,"products") || dienice("Can't open productsDB: $!"); while(<>) { chomp; my ($productId,$nmPrice,$mPrice,$itemName,$shortdesc,$image,$address) + = split/\|+/; print qq~ $itemName, $nmPrice ~; if $productId =~ /^B00/; } close INF;


T I M T O W T D I

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2022-08-08 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?