Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Syntax Perl Version support $c = () = $a =~ /\./g

by shmem (Chancellor)
on Jul 17, 2018 at 22:47 UTC ( [id://1218702]=note: print w/replies, xml ) Need Help??


in reply to Re: Syntax Perl Version support $c = () = $a =~ /\./g (updated)
in thread Syntax Perl Version support $c = () = $a =~ /\./g

and I believe 4.x did as well

No, it didn't and doesn't yet without patches ;-)

perl 4 patchlevel 36:

qwurx [shmem] ~> perl4 -e '$s="3.4.5";$r=()=$s=~/\./g;print$r,"\n"' Illegal item (LEXPR) as lvalue in file /tmp/perl-eEdymqE at line 1, ne +xt 2 tokens "/\./g;" Execution of /tmp/perl-eEdymqE aborted due to compilation errors.

However, chaining assignments and evaluating ARRAY in scalar context did:

qwurx [shmem] ~> perl4 -e '$s="3.4.5";$r=@r=$s=~/\./g;print$r,"\n"' 2

Applying semantics of ARRAY to LEXPR (list expression) happened in perl5.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-03-29 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found