On 11-03-18 04:31 PM, shawn wilson wrote:
my $writer = shift->(
  [ 200, [ "Content-type" =>  "text/plain" ], $s ]
);

shift will shift @_ in a sub and @ARGV outside of one. So the first question is this inside a sub or not?

The first item in the array (@_ or @ARGV) has to be a reference to a sub, which is given one argument: [ 200, [ "Content-type" => "text/plain" ], $s ] a reference to an array of three elements, the second one being a reference to another array which has two elements.

Its returned value is placed in $writer.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to