use strict; my $file = 'names.txt'; # Name the file open(INFO, "$file"); # Open for appending $" = "\#"; my @lines = ; # Read it into an array print INFO "@lines"; close(INFO); # Close the file open(INFO1, "$file"); # Open the file @lines = ; # Read it into an array close(INFO1); # Close the file print @lines; # Print the array