print STDERR "This is line 1.\n";
my $var = STDERR;
print $var "This is line 2.\n";
my %hash = (key => STDERR);
print "The value of the hash variable is $hash{key}.\n";
my $which_stream = $hash{key};
print $which_stream "This is line 3.\n";
#print $hash{key} "This is line 4.\n";
####
This is line 1.
This is line 2.
The value of the hash variable is STDOUT.
This is line 3.
##
##
String found where operator expected at test.pl line 12, near "} "This is line 4.\n""
(Missing operator before "This is line 4.\n"?)
syntax error at test.pl line 12, near "} "This is line 4.\n""
Execution of test.pl aborted due to compilation errors.