I suspect the author of that site may not have English as their first language either. In itself that is not any sort of issue. However the site has very worrying omissions that could cause rather unhappy days. For example the mentions of sigils ('$', '@', '%' ...) are in relation to variables, but that is misleading. Sigils are used to denote the type of a result so when they are used with variables they denote the type the of the variable in an expression. So far so good, but consider:

my @array = (1 .. 5); my $arrayRef = \@array; say "$arrayRef: @$arrayRef";

which prints for me (your result will be different):

ARRAY(0x7bc278): 1 2 3 4 5

In the say @ returns the contents of the scalar variable arrayRef as an array.

The much worse omission is that context plays a vital part in understanding what many Perl statements mean. Context seems not to be mentioned at all by the site. Consider:

my @array = (1, 2, 3, 4, 5); my $count = (1, 2, 3, 4, 5); say "$count: @array";

which prints (the first three lines are warnings btw):

Useless use of a constant (2) in void context at D:\Scratch~~\PerlScra +tch\noname.pl line 6. Useless use of a constant (3) in void context at D:\Scratch~~\PerlScra +tch\noname.pl line 6. Useless use of a constant (4) in void context at D:\Scratch~~\PerlScra +tch\noname.pl line 6. 5: 1 2 3 4 5

The site is a nice light weight introduction to Perl, but it misses important concepts and is somewhat dated. For example it discusses the "given statement" which is now deprecated and will be removed in future versions of Perl. Treat the material on the site with caution!

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

In reply to Re^3: Access a global variable from a subroutine when used as "for" iterator by GrandFather
in thread Access a global variable from a subroutine when used as "for" iterator by vitoco

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.