atoi functionality??? | topic started 2/21/2002; 7:46:15 PM last post 2/27/2002; 8:10:27 PM |
|
|
Michael Gage - Re: atoi functionality??? 2/27/2002; 8:10:27 PM (reads: 2291, responses: 0) |
For converting one character: one can use
$num = ord($char);
See page 9-10 of "Perl Cookbook" by Tom Christiansen & Nathan Torkington (O'Reilly) -- very useful for those who prefer not to reinvent the wheel. or chr ord pack and unpack in Chapter 3 of Programming with perl http://www.oreilly.com/catalog/cookbook/ http://www.oreilly.com/catalog/pperl3/ -- Mike |