Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by AnomalousMonk (Archbishop)
on Jul 30, 2020 at 01:16 UTC ( [id://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 (Sexton) on Jul 30, 2020 at 02:40 UTC
    Arigato gozaimasu ^^

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-23 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found