On Mon, 6 Dec 2004, Frank Westfield wrote: > Is there a Perl equivalent of Java String.toArray method? > > I need to get an Alpha-Numeric string (16 plus consecutive characters) > into an array or hash of characters to allow manipulation of the > individual characters. The use of substr to extract each characters > is unweildy.
split ? What are you ultimately trying to do here ? Whatever the problem might be, you can probably do it the way you're setting out on here, but it won't be idiomatic Perl and therefore it won't play into Perl's best strengths as a string manipulation language. If you describe what you're really trying to do, rather than just the mechanism by which you're trying to do it, we might be able to come up with a cleaner approach than treating the string as an array of chars. And by "might", I mean "nearly no question whatsoever" :-) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>