With "goatse" it's a list _assignment_ = which in scalar context returns the number of list elements assigned.
I'll have to accept that on faith. Edit: Well, I guess I don't have to take it on faith:
se strict;
use warnings;
use 5.012;
my $x = () = ('a', 'b', 'c');
#scalar context on left, a list assignment on right
#Full goatse syntax: my $x =()= ('a', 'b', 'c');
say $x;
--output:--
3
PS: you replied to yourself twice.
In my opinion, the indenting is a terrible feature. All posts in a thread should be at the same level of indenting--none. If you want to respond to a particular post, you should quote it.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|