Results 1 to 2 of 2

Thread: Array Help

  1. #1
    Join Date
    Feb 2004
    Posts
    24

    Unanswered: Array Help

    I have scalar value that I need to split into each character

    For example

    $sql= SELECT

    I want to be able to get each letter for example

    $sql[0]=S
    $sql[1]=E
    $sql[2]=L
    $sql[3]=E
    $sql[4]=C
    $sql[5]=T

    Is this posible? Is there a way to split and get each letter?

  2. #2
    Join Date
    Apr 2004
    Posts
    16
    my @letters = split //, $string;

    More info here:
    http://www.perldoc.com/perl5.8.0/pod/func/split.html
    perl -le 'print reverse reverse "just another perl hacker"'
    wush.net subversion hosting - remote hosted revision control with easy admin, ssl security & backups

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •