This is great! Thank you so much for your replies! They were very helpful. Okay, so a little clarification:
sub ccc{65} print "\n" . ccc.ccc.ccc.ccc; # this evaluates to numbers print "\n" . 65.65.65.65.65; # this evaluates to letters # Ok. It's a little weird, but it is what it is. my $A = sub { print "\nWELCOME! :-) (@_)\n"; 1 }; my $B = sub { print "\nGO AWAY! >:( (@_)\n"; 2 }; my $X = time % 2 ? $A : $B; print $X->(77); $A = 0; $B = 0; $X = 0; # So, if I create anonymous subs, # I can later simply "erase" them? # This is great. # # But now, what happens to my anonymous subroutines? # Do they simply disappear or stay in memory somewhere? print "\n" . __PACKAGE__; print "\n" . __FILE__; print "\n" . __LINE__; print "\n\n"; #sub MY{ my $K = __SUB__; } # Why is this giving me an error? #MY; sub P{(6,7,8)} # returns an array print "\n".(P)[0]; print "\n".(P)[1]; print "\n".(P)[2]; # Makes sense.

In reply to Re^2: Trying to understand Perl :-) by harangzsolt33
in thread Trying to understand Perl :-) by harangzsolt33

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.