in reply to Medicine monthly prices by dose calculator
Using open without checking for errors is asking for trouble. If you were going to do a one liner, why not use the -n option in perlrun? For a script as small as this, pass the input file on the command line, and use the while (<>) magic.
Many medications come in different concentrations, so comparing pill counts is still misleading. Why not expand your thinking a bit and give 2 sets of inputs, one the presribed daily dosage in standard units (say milligrams of active ingredient), and the other input listing the packaging choices available? Then the script can output the list of most economical choices (assuming that all are equally safe and effective, of course).
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Medicine monthly prices by dose calculator
by chanio (Priest) on Oct 24, 2005 at 23:50 UTC | |
by QM (Parson) on Oct 25, 2005 at 03:05 UTC |