in reply to Array construct and foreach loop

What you've shown is a string, i.e. a scalar, not an array. Using split can turn it into a list; you can populate an array with a list, or you can iterate over it directly:
#! /usr/bin/perl use warnings; use strict; my $string = 'abc def xyz'; # my @array = split ' ', $string; for my $part (split ' ', $string) { print "<$part>\n"; }
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]