hi everyone!
if I have a string, lets say
$word="perl";
I want to copy this so I have something like this:
@word_list["p","e","r","l"]
also, how do I get the length of @word_list?
thanks in advance!
Erik
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
@word_list = split //, $word;
$nrOfLetters = @word_list;
Erik Browaldh wrote:
>
> hi everyone!
>
> if I have a string, lets say
> $word="perl";
>
> I want to copy this so I have something like this:
> @word_list["p","e","r","l"]
>
> also, how do I get the length of @word_list?
>
> thanks in
, 2002 7:24 AM
Subject: transforming strings to an array of characters
> hi everyone!
>
> if I have a string, lets say
> $word="perl";
>
> I want to copy this so I have something like this:
> @word_list["p","e","r","l"]
>
> also, h
(Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: "Tanton Gibbs" <[EMAIL PROTECTED]>
To: "Erik Browaldh"
<[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: Re: transforming strings to an array of characters
Date: Mon, 9 Dec 2002 07:35:
Mystik Gotan said:
> If not using length() direcly on @world_list:
>
> @word_list = qw(bla bla bla bla bla joah hey);
Your following code is an expensive noop ...
> foreach $element (@word_list) {
> local($content);
Whoops. Why are you using local? Use my unless you _know_ that you need
local