Recently i came across code which looks like this
my $code = << 'ET'; { --- Some lines of code --- } ET test($code);
From what i can make out is the variable $code holds the code snippet terminating at ET. Am i correct ?
What is the use case/advantage of this implementation ?
Thanks in advance.
In reply to Assigning Perl code snippet to a variable by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |