> my $number = 0+ $strNumber; > > or "in place": > > $strNumber += 0; > > But there really is no need! The first time you use the variable as a > number, it will become a number (or rather a numeric reality will be > added to it), which is used in further numeric contexts
haha instead of adding and substracting 1 , it's even better adding zero, I understand what you are talking about, but there is really a need for me to convert to number while I am using the module, Language::Prolog::Yaswi, to convert the perl datatype into prolog dataatype, which is another language. If I did not do so, it would treat that as string instead of number. So I think there is not better way than adding 0. Thank you. Send instant messages to your online friends http://uk.messenger.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/