garymgordon
Programmer
I have an example I am looking at that says:
#!/usr/bin/per -w
open(OUT, "<test.txt"
;
print (OUT "This is text.\n"
;
close(OUT);
Output is:
print on closed filehandle main::OUT at test.pl line 4, <STDIN> chunk 2.
I don't understand the output.
Can you explain why, when using -w on this code, it would generate this warning. And, please explain what each piece of the warning is trying to tell me??
Thanks,
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
#!/usr/bin/per -w
open(OUT, "<test.txt"
print (OUT "This is text.\n"
close(OUT);
Output is:
print on closed filehandle main::OUT at test.pl line 4, <STDIN> chunk 2.
I don't understand the output.
Can you explain why, when using -w on this code, it would generate this warning. And, please explain what each piece of the warning is trying to tell me??
Thanks,
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer