Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Solutions:

Note that for a few exercises multiple solutions are given.

[1] $foo = *x;
[2] *foo = \substr $x, 0;
*foo = \vec $x, 0, 8;
[3] BEGIN { $^H |= 0x30000; $^H{qr} = sub{""} }
[4] *foo = qr/IO::Handle/;
[5] *foo = find PerlIO::Layer "raw";
[6] *foo = sub{\@_}->($x, $x);
[7] *foo = \42;
[8] *foo = sub{\@_}->(${*STDIN{IO}});
sub DB::DB { die if ++$x==2 } BEGIN { $^P |= 0x22 }
[9] $foo = "\n0"; $* = 1;
[10] //; *foo = \$+[0];
[11] *@ = *|; eval { die "2" };
[12] 2 =~ /(2)/; *| = \local $1;
2 =~ /(2)/; *| = *^N;
$[ = 2; *| = *[;
[13] &Internals::SvREADONLY(\undef, 0); undef = 42;


In reply to Re: How's your Perl? (II) by xmath
in thread How's your Perl? (II) by xmath

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (9)
    As of 2014-08-28 12:22 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (259 votes), past polls