open (FILE, "; # get whole file into array close(FILE); chomp @stuff; # cut out trailing newlines my $string = join(', ', @stuff); # join to one string undef @stuff; # clean up behind us