print "Now using Wrap method \n"; $Text::Wrap::columns = 60; my $text = wrap('', '', $smstext); my @chunks = split(/\n/,$text); # split $text into chunks print $chunks[0]."\n".$chunks[1],"\n"; #take first two lines