use warnings; use strict; open OUT, '>', 'delme.txt'; print OUT <) { if ($. == 1) { print STDOUT "File geing processed is $ARGV\n"; open OUT, '>', $ARGV or die "Can't open $ARGV: $!"; print OUT <<" NEWTEXT"; 2) can someone make modifications on that file, isnt it already opened by the <> diamond operator? NEWTEXT } print; print STDOUT; } close OUT; print "\n"; open IN, '<', 'delme.txt'; print ; close IN; #### File geing processed is delme.txt 1) how can someone know what is the current edited file's name ? question 2) can someone make modifications on that file, isnt it already opened by the <> diamond operator?