Perl array FAQ: How do I print the entire contents of an array in Perl?
To answer this question, we first need a sample Perl array. Let's assume that you have an array that contains the name of baseball teams, like this:
@teams = ('cubs', 'reds', 'yankees', 'dodgers');
Perl array printing
Now, if you just want to print the array with the array members separated by blank spaces, you can just print the array like this: