Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] perl string > integer conversion: please help!



******    message to minivend-users from Sezer Yalcin <sezery@damla.net>     ******

i am crazy with perl strings, please help me how to make sure that this
will return an integer, not a string?

$rate = '[data taxgroups rate [item-field taxgroup]]';

any suggestions? there was such a problem resolved in discussion groups
i searched all of them and could not find!

please help.

> 
> i have a simple but crucial question:
> in [perl], i am in trouble with that perl integer/string type cast!
> 
> $rate = '[data table="taxgroups" field="rate" key="[item-field
> taxgroup]"]';
> # this database field is absolutely an integer
> $rate +=  10;  # not work!!!!
> XXXXXXXXXXXXXXXX
> Now this does not work but:
> 
> $rate = '[item-field taxrate]';
> $rate += 20;
> This pretty works!!!
> 
> I see it is from string/integer casting but how can i eliminate this? I
> remeber a past post n this topic searched archives for hours but could
> not find it.
> 
> i tried a double-bracked version and also with q{} but did not work out.
> 
> Please help asap.
> 
> best,
> Sezer.
> 
> -
> 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
-
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


Search for: Match: Format: Sort by: