Re: Each char / letter --> array from string value



On 12/28/05, Umesh T G <umesh.perl@xxxxxxxxx> wrote:
> I need to put each letter from a string to an array.

The usual way to tear apart a string into an array with characters is

@chars = split '', $string;

It is documented at C<perldoc -f split>.
.



Relevant Pages

  • Re: Help a beginner - simple lowercase to uppercase and so on function
    ... And then one to loop across the string calling that function ... copying at to a new array. ... are any characters other than lowercase letters */ ...
    (comp.lang.c)
  • Re: fgets question
    ... documentation didn't say if fgets put \0 after a string literal. ... fgets() has nothing at all to do with string literals. ... within the bounds of the array, then it is not a string. ... strlenon an array of characters that is not a string, ...
    (comp.lang.c)
  • Re: Help creating a random string in Perl
    ... can pick one of the 7 characters in my source string) by using "print ... third and fourth characters to and check that the random number hasn't ... shuffling the array ... The idea here is to swap the current cell with some cell ...
    (perl.beginners)
  • Re: newbie: mapping CHARACTER*2 to INTEGER*2
    ... that destroys the Chinese characters in my input. ... effect the conversion required. ... If MOLD is an array and SIZE is omitted, ... represent the values 4.0 and 1082130432 as the string of binary digits ...
    (comp.lang.fortran)
  • Re: Parsing binary values in the registry
    ... how to take a string variable that could concievably be up to 300 ... and split that into either an array or multiple variables for ... every 32 characters within the original varable. ... I am trying to build a file path from a binary value in the ...
    (microsoft.public.scripting.vbscript)

Loading