ashok has asked for the wisdom of the Perl Monks concerning the following question:
The answaer isfile File1.c
It is the same for all three files. Then I wrote a perl script checking whether any C type comments(/* */) or C++ comments(//) existing. Is there any betterway(any perl function) to check the file belongs to which language C/C++ or a textfile without opening it?File1.c: ascii text
Thanks Ashok
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file type
by chipmunk (Parson) on Feb 09, 2001 at 03:45 UTC | |
by Anonymous Monk on Feb 09, 2001 at 05:21 UTC | |
by sierrathedog04 (Hermit) on Feb 09, 2001 at 16:39 UTC | |
|
Re: file type
by arturo (Vicar) on Feb 09, 2001 at 03:21 UTC | |
|
Re: file type
by eg (Friar) on Feb 09, 2001 at 03:22 UTC | |
by arturo (Vicar) on Feb 09, 2001 at 03:24 UTC | |
|
Re: file type
by ichimunki (Priest) on Feb 09, 2001 at 03:44 UTC | |
by AgentM (Curate) on Feb 09, 2001 at 03:53 UTC | |
by sierrathedog04 (Hermit) on Feb 09, 2001 at 10:59 UTC |