On 11-08-01 08:14 AM, Emeka wrote:
Hello All,

I would like to know how to access character from string lateral.

Say I have
$foo = "From Big Brother Africa";
I would want to print each of the characters of  $foo on its own.

In some languages string type is just array/list of characters. What is it
in Perl?

It's a scalar. But you can easily convert it to a list and store it in an array.

my @characters = split //, $foo;


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

"Make something worthwhile."  -- Dear Hunter

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to