#!/usr/bin/perl use strict; use warnings; my @a; open (FH,'<',$ARGV[0]); #or @ARGV[0] while() { push(@a,$_); } print "@a";