#!/usr/bin/perl -w use strict; my @newfile; open (FH, "./testfile"); while () { chomp; push @newfile, $_.' '.; } close FH;