- or download this
@array1 = ('one','two','three');
@array2 = ("four","five","six");
...
#OUTPUT
one two three
four five six
- or download this
@array = qw(one two three);
print @array, "\n";
...
one two three #spaced and the "\n" replaced with a new line.
@array\n #prints @array and "\n" as literals.
- or download this
use strict; #a good habit to start your program with line
use warnings; #another good habit too...
...
print "@array4\n";
print "@array5\n";
- or download this
@array = qw(one two three four);
for($index=0;$index<=$#array;$index++){
print $array[$index],"\n";
}