in reply to Re: How to access each element in an array Perl
in thread How to access each element in an array Perl
use Data::Dump; my $string = 'LarryWall'; my @array = split//, $string; dd @array;
(Data::Dump is just to show what's in the array)
Here's a oneliner doing the same thing
perl -MData::Dump -e 'my $str = 'LarryWall'; my @arr = split//,$str; d +d @arr;'
|
|---|