Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: /HTML is valid perl?

by japhy (Canon)
on Oct 23, 2001 at 07:52 UTC ( #120703=note: print w/ replies, xml ) Need Help??


in reply to /HTML is valid perl?

To Perl, <HTML> looks like a line-read from the filehandle HTML. However, if you have something that isn't a filehandle (or a variable holding a filehandle) in there, Perl sees it as a file glob. </HTML> is the glob /HTML. Even something as simple as whitespace (as shown below) triggers this distinction.

Here's some fiendish Perl:

<perl >; <head type="pragma">; use strict; </head >; <body >; my $name = "japhy"; my $code = "evil"; my $reasons = "plenty"; </perl >;

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;


Comment on Re: /HTML is valid perl?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://120703]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-31 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls