#!/usr/bin/perl $file="testin.txt"; $outfile="testout.txt"; open (IN, $file) or die "$!"; open (OUT, ">$outfile") or die "$!"; while () { print OUT $_; } print "input output test \n"; print OUT "The end of input output test \n"; close (IN); close (OUT); -------------------------------------------- $ perl out.pl input output test ----------------------------------------- $ cat testout.txt gajaje jjshg g , The end of input output test