Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I think Perl 6 should support html embedding that php has to enable Perl to be embedded in html or xml. The only advantage PHP has over Perl is that it can be embedded within html. PHP is not a general purpose language. In addition multilanguage scripting can also be implemented by language code tag attributes. The project also mirrored on cpan as a Perl script demonstrates this.

    The Perl code can be put within code
    markup tags "<code>" "</code>" similar to D. This wo
    • by mx.2000 (6123) on 2005.08.24 6:41 (#42853)
      If I remeber correctly, you can embed code in Strings with {...}. (the Perl5-hack of this would be @{[...]} )

      So you could just write:

        say $headerstuff;
        say "
        <title>Perl6 Test</title>
        { say '<p>Hello World</p>' }

      or something like that. (Actually, it may work better without 'say' inside the string.)
      • Thats true you can write that in Perl. However,
        It would still be interesting if there an option
        in Perl 5 or 6 to parse html and process the code
        inside a tag and display the html and run the code. This would be an integrated perl option not provided as a separate module.

        This is like a Perl version of PHP and would render PHP obsolete.

        Perl 6 could do it this way.
        % more perl6.html
            <title>Perl6 Test</title>
        • The PHP group recently had a discussion and conspired to do in Perl. No, I'm just kidding
          but there are those who would meet in a dark room and conspire to dethrone a king or remove a wall.

          As a further extension

          % more perl.program.html
          <p>This is the way to barbosa</p>
          sub combinations returns Array (@list is rw) {
              return () unless @list.elems;
              my @ans;
              for 1 .. 2**@list.elems-1-> $num {
      • It already exists: []