in reply to Tutorial on arguments for the new

Oh look, this isn't an argument. update2: video

sorry, couldn't resist ;-)

update:

foo($bar, $baz); # ... sub foo{ print "$_"; #will first print out the contents of $bar, then $baz ...
No it won't.

you mean

sub foo { print for @_; } # or sub foo { print @_; }

Replies are listed 'Best First'.
Re^2: Tutorial on arguments for the new
by Andrew_Levenson (Hermit) on Dec 11, 2006 at 21:17 UTC
    I was going to start with "I'd like to register a complaint!" but I realized it was the wrong sketch. We'll save that one for the tutorial on getting started with... that other language.

    And, thanks for pointing that out to me.
    C(qw/74 97 104 112/);sub C{while(@_){$c**=$C;print (map{chr($C!=$c?shift:pop)}$_),$C+=@_%2!=1?1:0}}
Re^2: Tutorial on arguments for the new
by PockMonk (Beadle) on Dec 11, 2006 at 21:21 UTC
    I think he was just trying to explain for others starting out what arguments were and how they were passed to subroutines, I don't think the exact code matters all that much. Even clearer might be:
    my ($bar, $baz) = ("Hello ", "World"); foo($bar, $baz); # ... sub foo{ print "$_[0]"; #prints "Hello " print "$_[1]"; #prints "World"