From owner-freebsd-questions@FreeBSD.ORG Thu Oct 4 20:16:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D322F16A41B for ; Thu, 4 Oct 2007 20:16:29 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: from pearl.ibctech.ca (pearl.ibctech.ca [208.70.104.210]) by mx1.freebsd.org (Postfix) with ESMTP id 749DD13C494 for ; Thu, 4 Oct 2007 20:16:29 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: (qmail 54562 invoked by uid 1002); 4 Oct 2007 20:16:28 -0000 Received: from iaccounts@ibctech.ca by pearl.ibctech.ca by uid 89 with qmail-scanner-1.22 (spamassassin: 2.64. Clear:RC:1(208.70.104.100):. Processed in 11.245388 secs); 04 Oct 2007 20:16:28 -0000 Received: from unknown (HELO ?192.168.30.110?) (steve@ibctech.ca@208.70.104.100) by pearl.ibctech.ca with (DHE-RSA-AES256-SHA encrypted) SMTP; 4 Oct 2007 20:16:16 -0000 Message-ID: <47054A1D.2000701@ibctech.ca> Date: Thu, 04 Oct 2007 16:16:29 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: FreeBSD Questions References: <4704DFF3.9040200@ibctech.ca> <200710041458.22743.wundram@beenic.net> <20071003200013.GD45244@demeter.hydra> In-Reply-To: <20071003200013.GD45244@demeter.hydra> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Managing very large files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2007 20:16:29 -0000 >> man 1 split >> >> (esp. -l) > > That's probably the best option for a one-shot deal like this. On the > other hand, Perl itself provides the ability to go through a file one > line at a time, so you could just read a line, operate, write a line (to > a new file) as needed, over and over, until you get through the whole > file. > > The real problem would be reading the whole file into a variable (or even > multiple variables) at once. This is what I am afraid of. Just out of curiosity, if I did try to read the entire file into a Perl variable all at once, would the box panic, or as the saying goes 'what could possibly go wrong'? Steve