For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > October 2006 > Reducing file length in Perl?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Reducing file length in Perl?
Mark

2006-10-30, 7:10 pm

Hello.

I am processing a large text file, and I need to eliminate all data after a
certain point in the file. Essentially I need to specify a new EOF, sort of
an "anti-append"; the file saved on disk would become considerably smaller.

Is there a way to do this in Perl without writing the text that I want to
keep to a new file?

Thanks
-Mark


usenet@DavidFilmer.com

2006-10-30, 7:10 pm

Mark wrote:
> I am processing a large text file, and I need to eliminate all data after a
> certain point in the file.


perldoc -f truncate

--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)

Mark

2006-10-30, 7:10 pm

<usenet@DavidFilmer.com> wrote:
> Mark wrote:
>
> perldoc -f truncate


Dammit, I swear I looked that up in my Perl book.

It's there now, of course. I suppose the gnomes
snuck the page back in while I was posting my
question.

Thanks
-Mark


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com