#!/usr/bin/perl use warnings; use strict; my $test = "this is a test and hope this will work.\nif it doesnt, then its ok.\n"; my @array = split (/\n/, $test); print "$array[0]\n"; my @splitarray = split (/ /, @array); print "@splitarray\n"; #### this is a test and hope this will work. 2