head as in "unix"

2002-09-18 Thread Jakob Kofoed
Hi there, Does Perl have a function like the UNIX head. e.g. I have a file with a header - and I only need the data from line 100 and forward where the single lines are put in to a array for further "treatment". I know Perl can do it but how?? Thanks. Cheers, Jakob -- To unsubscribe, e

Re: head as in "unix"

2002-09-18 Thread Matt Simonsen
You could write your own function that is a for loop that counts until 100, putting each line into the array and quits would work. There may be a more elegant way, though... Matt On Wed, 2002-09-18 at 09:31, Jakob Kofoed wrote: > > Hi there, > > Does Perl have a function like the UNIX head.

RE: head as in "unix"

2002-09-18 Thread nkuipers
>e.g. I have a file with a header - and I only need the data from line >100 and forward where the single lines are put in to a array for further >"treatment". If you are SURE of consistent formedness in your input file (data will always be at lines 100+) you could use the $. var, which holds the

RE: head as in "unix"

2002-09-18 Thread david
Nkuipers wrote: >>e.g. I have a file with a header - and I only need the data from line >>100 and forward where the single lines are put in to a array for further >>"treatment". > > If you are SURE of consistent formedness in your input file (data will > always be at lines 100+) you could use th

RE: head as in "unix"

2002-09-18 Thread Janek Schleicher
Nkuipers wrote at Wed, 18 Sep 2002 18:53:44 +0200: >>e.g. I have a file with a header - and I only need the data from line >>100 and forward where the single lines are put in to a array for further >>"treatment". > > If you are SURE of consistent formedness in your input file (data will always

Re: head as in "unix"

2002-09-19 Thread ANIDIL RAJENDRAN
- Original Message - > Nkuipers wrote: > > >>e.g. I have a file with a header - and I only need the data from line > >>100 and forward where the single lines are put in to a array for further > >>"treatment". > > > > should probably be "$. == 100" but this is a bit better: > > last if($.

Re: head as in "unix"

2002-09-19 Thread david
Anidil Rajendran wrote: > > Hi > He only cares lines 100 onwards > regards oh. i need more coffee and need to pay more attention to the OP. thanks for pointing this out. my bad. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]