Snowman has asked for the wisdom of the Perl Monks concerning the following question:
I need to check the first line of a large number (>100) of files for the presence of '#!...' and return the line.
Obviously I can open each file and check the first line, but this is time consuming.
Is there a quick way do this?
-- The Snowman snowman@notreally.co.uk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quickly reading the first line of a large number of files...
by scain (Curate) on Aug 08, 2001 at 17:31 UTC | |
|
Re: Quickly reading the first line of a large number of files...
by arturo (Vicar) on Aug 08, 2001 at 17:34 UTC | |
|
Re: Quickly reading the first line of a large number of files...
by $code or die (Deacon) on Aug 08, 2001 at 17:37 UTC | |
|
Re: Quickly reading the first line of a large number of files...
by Hofmator (Curate) on Aug 08, 2001 at 17:33 UTC | |
|
Re: Quickly reading the first line of a large number of files...
by Snowman (Acolyte) on Aug 08, 2001 at 17:41 UTC | |
by tilly (Archbishop) on Aug 09, 2001 at 09:31 UTC | |
|
Re: Quickly reading the first line of a large number of files...
by c-era (Curate) on Aug 08, 2001 at 17:32 UTC |