[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] A little perl help?
****** message to minivend-users from Scott Satterthwaite <ssattert@homier.com> ******
For no particular reason other than as an excersise in learning perl,
I want to check a table (called surcharge.csv) for the existance of a
record. The table is defined in catalog.cfg:
-----------
Database Surcharge Surcharge.csv CSV
----------
The table itself consists of one column of zipcodes with a field name of
'zip':
-----------
zip
01011
01015
...
99876
------------
In the user_tag (I'm modifying Mike's ups_each tag) I'm trying something
like this:
------------
if (Vend::Interpolate::tag_data('Surcharge', 'zip', $::Values->{zip})) {
do this;
}
-----------
The idea being, that if the zipcode exists in this table, to add the
specified surcharge amount to the cost. I can get everything to work
except determining if the zipcode is in the table.
Since this doesn't work, it is obviously the wrong way to go about it.
Someone care to set me straight please?
Scott
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list