Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The substr function:
Remember the strings are Zero-Based - i.e. - the first character is character '0', the second character is character '1' and so on.... By that logic, the n-th character is character '(n-1)' So you're n-th character can be extracted as $nth = substr($string, n-1, 1); In reply to Re: How do I get the Nth Character of a String?
by gridlock
|
|