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.
  • perl6 -e 'say "Hello, World"'
    perl -E 'say "Hello, World"'

    OK, beat me for it ;-)

    (I know that -E is not great because then you have to explain why it's available in the one-liner, and not in "normal" programs by default).
    • I thought about that during the day. These examples are good, and in fact I think that they may be used as the first examples of Perl code.

      They slightly break the idea of showing pure Perl code, but it is better in that you don't need even a file to save the programme in. Just run it from the command line.

  • perl -Mcommon::sense -le 'say "hi andy!"' # credits for digging out this module goes to daxim :)
  • Why not go the other way and do a hello world with as many builtins as possible. ^.^