in reply to how to escape eof - chr(26)?

$ perl -wle 'open (F, ">test"); print F chr(26) . "Wont get in"; close +(F);'; cat test Wont get in

is what I get. perl v5.6.1 on i686-pc-linux-gnu. What do you mean by "escape the eof" and "get it right"? -- what is the question exactly?