use Data::Dumper; my $text = 'Your stuff goes here!' x 42; # filehandle to read the contents of $text open my $reader, '<', \$text; # read 70 characters at a time local $/ = \70; my @tokens = <$reader>; print "Here are my tokens:\n", Dumper(\@tokens);