Re: Is substr only way of getting nth character of string?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Robbie Hatley ( wrote on VCCCXIV September MCMXCIII in
::  Is there any more eloquent way of obtaining the nth
::  character of a string?  Or is substr() the best way?

"substr ()" is the best way. If you want the C equivalent of a "character",
use "ord substr ()". Because in C, "characters" are numbers.

perl -swleprint -- -_=Just\ another\ Perl\ Hacker

Site Timeline