Append two arrays to form another array
#!c:/perl/bin
@warships=('H', 'B', 'W');
@passengerships=('T', 'O', 'B');
@ships = (@warships, @passengerships);
print "@ships[0] \n";
print "@ships[1] \n";
print "@ships[2] \n";
print "@ships[3] \n";
print "@ships[4] \n";
print "@ships[5] \n";
Related examples in the same category