#! /usr/bin/perl -w use strict; my $i = 0; my $element; my @words; my @all_words open FILE, "<", "input.txt" or die $!; print "file loaded \n"; while () { # the words from *this* line @words = split('', $_); push @all_words, @words; } print "table loaded \n"; foreach $element (@words) { print "$element"; }