in reply to Inserting javascript into perl script
The last part can be changed to 'END' if you want to prevent variables such as $foo from being interpolated. Of course, you might want this, so the option is there.print <<END; // JavaScript goes here // ...in large quantities. END # Perl continues here
As a tip, qq interpolates like double quotes, while q alone is like a single quoted string. Carefully choose your delimiter, though, since it can confuse the parser if it appears within your JavaScript. Tilde is a fairly safe bet, I would presume.print qq~ // JavaScript goes here // ...as long as there's no tildes (which end it) ~; # Perl continues here
|
|---|