Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^9: Not understanding 2 sentences in perldoc (updated)

by AnomalousMonk (Bishop)
on Jul 30, 2020 at 01:16 UTC ( #11120038=note: print w/replies, xml ) Need Help??


in reply to Re^8: Not understanding 2 sentences in perldoc
in thread Not understanding 2 sentences in perldoc

c:\@Work\Perl\monks>perl -wMstrict -le "my ($x, $y, $z); ;; ($x, $y, $z) = qw( 1 2 3 ); print qq{$x, $y, $z}; ;; (($x, $y, $z) = qw( 1 2 3 )) = qw( a b c ); print qq{$x, $y, $z}; ;; ((($x, $y, $z) = qw( 1 2 3 )) = qw( a b c )) = qw(foo bar baz); print qq{$x, $y, $z}; " 1, 2, 3 a, b, c foo, bar, baz
The expression  ($x, $y, $z) = ... evaluates to a list of assignable values, i.e., lvalues.
The expression  ($x, $y, $z) = RHS evaluates to the list of assignable values, i.e., lvalues, $x, $y, $z.

And likewise with

c:\@Work\Perl\monks>perl -wMstrict -le "my ($x, $y, $z) = qw( 1 2 3 ); print qq{$x, $y, $z}; ;; (my ($u, $v, $w) = qw( 1 2 3 )) = qw( a b c ); print qq{$u, $v, $w}; ;; ((my ($r, $s, $t) = qw( 1 2 3 )) = qw( a b c )) = qw(foo bar baz); print qq{$r, $s, $t}; " 1, 2, 3 a, b, c foo, bar, baz


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^10: Not understanding 2 sentences in perldoc (updated)
by zapdos (Acolyte) on Jul 30, 2020 at 02:40 UTC
    Arigato gozaimasu ^^

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11120038]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2020-09-28 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (144 votes). Check out past polls.

    Notices?