Hi Thanks for your support in this I have now resolved my problem with your help and the following is my solution
Cheers
Phil.R
#content of test_file.dat
#ALPHA 3 4 5 6 7.0 8 9 4
open (FH, "<test_file.dat") or die "cant open file $!";
while (<FH>) {...
Hi Thanks for the input so far althouh not answered yet! a little more explanation may be required...
I am reading values from a file so do not have the opportunity to wrap with quotes, because each time I read a "value" into a variable with the format i am stuck with I loose the decimal point...
I have the following code to identify a decimal number, however if the number is 10. or 10.0 format ie no trailing numbers after decimal point or a single trailing zero my function fails can ay one help?
sub is_float {
#Warning this does not return is_float true when the number ends like:-
#...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.