Home‎ > ‎scripting‎ > ‎Perl Cookbook‎ > ‎

Arrays to Lists



Code:

#!/usr/bin/perl -w
#

my @array = ("Fred","Joe", "Margaret", "Hilda");
my $list = "@array";
my $count = @array;

print "list = $list \n";

print "count = $count \n";

Output:

list = Fred Joe Margaret Hilda
count = 4


Comments