as usually happens, I realized a flaw to my question right after I
asked it; I can't pop off the last record, because I won't know what
it is when the script starts. Duh.
So, with that said, I'd still like a way to drop that first test. Is
my best bet to open the handle, read a single loop, then start the
MAIN loop after that? Or is there an actual function to drop that
first record?
Sorry for the extra email 
Brian
--- In perl-beginner%40yahoogroups.com">perl-beginner
yahoogroups.com, "Brian" <brianlamere
...> wrote:
>
> hi - can't find something, hoping someone can help :(
>
> Have a record that can be really long (it has reached 10G in the
> past...) and I need to parse it.
>
> here's the basic idea:
>
> open (AUDISP, "$audcmd $audfile |") or die "Cannot open $audcmd pipe:
> $!n";
> my $ct = "-1";
> $/ = "~" x 105 . "n";
> MAIN: while (<AUDISP>) {
> $ct++;
> next MAIN if ( $ct == 0 );
> last MAIN unless /S/;
>
>
> I know the first and last records will be junk, so I don't want to do
> anything to them. But instead of testing every single loop for
> whether they are the first or last record, are there pop/shift-like
> functions for filehandles, such that I could just remove the darn
> things without a test?
>
> Is that a dumb question? Can be many millions of the loop, and 2
> useless tests times "many millions" means wasted time.
>
> Thanks!
> Brian
>
.