Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: really big data files
Date: Tue, 17 Nov 2009 15:21:04 +0000 (UTC)
Organization: Macaulay Brown, Inc
Lines: 20
Message-ID: <hduf10$9lj$1@fred.mathworks.com>
References: <hd75si$m75$1@fred.mathworks.com> <dfca570a-9e21-4622-bdea-69768c9d26b4@p8g2000yqb.googlegroups.com> <cd0233f3-cd34-402b-86a8-883f7bdf2cac@x6g2000prc.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1258471264 9907 172.30.248.37 (17 Nov 2009 15:21:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Nov 2009 15:21:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1953538
Xref: news.mathworks.com comp.soft-sys.matlab:585795


Excerpt from above:

> >?Let me restate my question. ?Is there a way to determine the number of lines in a large file without reading in the data (which will crash Matlab)?
> >
> > I want to use the total number of lines to determine the best way to segment the files. ?
> >
> > Jon
> 
> Copy and paste these lines into a new file called CountLines.pl in
> Matlab's path:
> while (<>) {};
> print $.,"\n";
> 
> Now, run it in Matlab like this:
> perl('CountLines.pl',filename)
> where filename is your file name.

Tideman, that worked great (and is about 100 times faster than the code I had above)...until I tried to access a file from a network location (\\abc-def-45\data...).  Is there a perl command that will allow UNC file locations to be recognized?

Jon