Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Deleting EOF from a file

by matija (Priest)
on Jul 15, 2004 at 17:23 UTC ( #374734=note: print w/replies, xml ) Need Help??

in reply to Deleting EOF from a file

The propper way to read a file in Perl is
while (<FILE>) {
That will terminate the loop once end of the file is reached.

You can't create a file that has no EOF at all. Not even on windows. You can create a file that appears very long (like /dev/zero on unix), but you have to work at it. Don't worry, whatever file you try to read on your system, the system will let you know when you've reached the end of file.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://374734]
[Tanktalus]: perldigious: I'm not looking to get rich. I'm looking for interesting work, with good continuity of employment, and maintenance of our current lifestyle. (An improvement wouldn't be bad, either, but that's not a requirement ;) )
erix enjoys the confusion++
[Your Mother]: :P
[Tanktalus]: Without confusion, I'd be out of a job ;)
[Tanktalus]: Already. :D
[Lady_Aleena]: Your Mother, I wish it did have a way to put in a directory to search.
[Your Mother]: Thatís silly. Itís a string op tool.
[Lady_Aleena]: So I guess I'll go argue with File::Find and grep.
[Your Mother]: I would probably use Path::Tiny instead for it's slurp and such.
[Your Mother]: s/it's/its/

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-05-23 19:37 GMT
Find Nodes?
    Voting Booth?