Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by Cine (Friar)
on Aug 01, 2003 at 16:15 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found