I don't believe you've read the errors returned from running this code. You'd have been alerted to the fact that you're missing a quotation mark. Don't ignore the errors returned when running your code. You don't seem to have any programming experience at all. You create a file called not.txt, in which you place perl code to open not.txt and overwrite it's contents with "hello!". I suggest you think about what you're doing.
You've posted here many times on the subject of being "new to perl", and asking for answers to exam qustions. If you actually want to learn perl I suggest you read and understand at least some of the following:
In reply to Re^3: how to create a perl program using filehandle and streams ?
by marto
in thread how to create a perl program using filehandle and streams ?
by Monk_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |