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 '!<html>.+?</html>!s and print "html\n"' html.htm
> This does not work. What is the problem?

The <html> is rarely on the same line as the </html> in a html file so
this will very rarely match.

-- 
Ken Foskey
FOSS developer


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to