in reply to accessing/printing specific rows in a flat file DB
Just filter when you are reading in your data.
T I M T O W T D I
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
In Section
Seekers of Perl Wisdom