perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Schilling <rschill...@nationalinformatics.net>
Subject behavior of [! !]
Date Sat, 02 Aug 2003 02:52:57 GMT
Was reading through the documentation, and don't see too much detail on 
the exact differences between [! !] and [- -].  I see that [! !] runs 
the code block once.  But, it's unclear what "once" means.

Here's a little test I did:

test2.epl:
<HTML><HEAD></HEAD><BODY>
                                                                                         
[- $a = 0 -]
                                                                                         
[! $a++; !]
                                                                                         
a = [+ $a +]<br>
                                                                                         
<FORM ACTION="test2.epl" METHOD="POST">
                 <INPUT TYPE="SUBMIT" VALUE="Submit 2">
         </FORM>
                                                                                 
</BODY>
</HTML>

Is the [! !] block run the first time the page loads, and therfore not 
run again when you click refresh?
When I use [! !] to define a subroutine, where is the subroutine stored?
[- -] blocks allow me to use variables created in them later in the 
page.  Why does [! !] do not?


Thanks!

Richard Schilling





                                                                                 

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message