Fian has asked for the wisdom of the Perl Monks concerning the following question:
How can I convert the string 36 to the integer 36?
I don't just mean 36 but any number stored as a string.
I have a list of rules and associated with each rule there are two digits
So, I have a hash with the ruleids as the keys and the two integers are added like this, 36+10, and stored as a string.
Later when I want the two separate integers I split on + to get them but I now have two strings and I want two integers.
Helpeth,
Fian.
Aontroim Abú.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string to scalar?
by larsen (Parson) on Jun 20, 2001 at 14:12 UTC | |
|
Re: string to scalar?
by busunsl (Vicar) on Jun 20, 2001 at 14:04 UTC | |
|
Re: string to scalar?
by virtualsue (Vicar) on Jun 20, 2001 at 14:27 UTC | |
|
Re: string to scalar?
by perchance (Monk) on Jun 20, 2001 at 14:35 UTC | |
|
Re: string to scalar?
by jplindstrom (Monsignor) on Jun 20, 2001 at 16:46 UTC |