print ; #Prints entire file #### while (){ #### #!/usr/bin/perl use strict; use warnings; my $file_name = 'FB_LPWAP.txt'; open my $FILE, '<', $file_name or die "ERROR: Could not open file $!"; # better syntax for opening a file # print <$FILE>; don't do that, you will get no data in the while loop while (<$FILE>){ my @array = split /\t/, $_; # with the data shown, you should split on pipe or on a pattern such as /\|\s*/ print join "\t", @array, "\n"; } close ($FILE);