Wow.... pls let me quote back the original writer asking what :

>>>I get a value from a URL and I put it into a variable.
>>>I have a loop (while) with a value which have different values.
>>>The problem is that when I compare the first and the second value: If
>>>they're really equals, the program say they are'nt.
>>>
>>>Is ther a function to convert a value into an integer ?

----- Original Message -----
From: Michael Fowler <[EMAIL PROTECTED]>
To: Exile <[EMAIL PROTECTED]>
Cc: PERL <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 11:22 AM
Subject: Re: types of datas

Q1.
>You're comparing $a to $b using the regex operator.

Well, it's not all right, but half. Not $a to $b only, but $b to $a also.
In case, I suppose everybody should know use "eq" to compair string...
I just suggest another way, which not costing too much line.

As a CGI comparing habit, input a data twice is mostly in PASSWORD
or E-MAIL, use double "=~" is visually help.


Q2.
> int is not for converting a string to an integer.

Anybody mension that "value" in terms of a "string"? Couldn't it be a real
number? In case, if a string is visually an interger number / real number ,
there is no need to convert, right? $x = "10.5"; print ($x  - 10) will
output as 0.5, right?

Unless returning an ASCII sort, I don't think there is any needs to convert
a string to
integer, right?

Please, before critisize, clarify what the question is.



Reply via email to