> Thus spoke PRADEEP GOEL <[EMAIL PROTECTED]> last [2003-01-31 10:48]: > Dear Senior Programmer Analyst > > did it solves the problem ? > I don't think so . > > there is one very simple logical flow > if ($temp_unit eq 'C' or 'c'){ > should be > if ($temp_unit eq 'C' or $temp_unit eq 'c'){ > that's all > [snip]
hi Pradeep, yep that's right, the error is indeed where you pointed out. i changed that line accordingly and conversion is now consistent. hello david, [snip] > > I changed two points in your code: > > > > m/^([+-]?\d+)(\.{1}\d+)?[ ]?([cCfF])$/ > > to > > m/^([+-]{0,1}\d+(\.\d{0,2}){0,1})\s*([CF])$/i yep i understand your version. the ? meta-char is optional, or {0,1} but less typing. ditto for the decimal portion. your catching of space is more flexible in that it also includes tabs, newline and other whitespace characters while mine is just 0 or 1 space and no more. as for the temp suffix i agree the /i modifier is shorter than my character class. tmtowtdi in Perl. thanks. -- Regards, Eri Mendz Using Perl, v5.8.0 Linux 2.4.19-16mdk i686 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]