in reply to Spliting letters in a string

Instead of using single variables (and having to get nasty with eval and forsake strict), use a hash instead:
my $str = join('', ('a'..'p')); my %hash = map { $_ => $_ } split('',$str); # silly example of using the hash print $hash{j} . $hash{e} . $hash{f} . $hash{f} . $hash{a} . "\n";

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
(ar0n) Re: (jeffa) Re: Spliting letters in a string
by ar0n (Priest) on May 08, 2001 at 02:34 UTC
    my %hash; @hash{'a'..'z'} = 'a'..'z';
    Hash slices, my man, hash slices.

    ar0n ]