#!/usr/bin/perl -wT open (my $infile, '<', 'testyfin.txt'); my $ofile_name=<$infile>; my $file3=$ofile_name; print "\n"; print "Printing to file: " . $file3; print "\n"; open (my $outfile3, '>', $file3); print $outfile3 "hello from testyc.pl\n"; close($outfile3);