On 8/8/07, kapil.V <[EMAIL PROTECTED]> wrote:
> Hi,
> I tried this to see if the file is an html:
> perl -ne '!.+?!s and print "html\n"' html.htm
> This does not work. What is the problem?
>
The first problem is that it's not valid Perl; it won't compile. You
should be seeing an error like "Su
On Aug 8, 2:29 am, [EMAIL PROTECTED] (kapil.V) wrote:
> I tried this to see if the file is an html:
> perl -ne '!.+?!s and print "html\n"' html.htm
> This does not work. What is the problem?
-n repeatedly loops through all lines of the file, each iteration
assigning $_ to be the current line.
On Wed, 2007-08-08 at 11:59 +0530, kapil.V wrote:
> Hi,
> I tried this to see if the file is an html:
> perl -ne '!.+?!s and print "html\n"' html.htm
> This does not work. What is the problem?
The is rarely on the same line as the in a html file so
this will very rarely match.
--
Ken Foske