Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: String concatenation

by JavaFan (Canon)
on Apr 11, 2012 at 21:22 UTC ( #964630=note: print w/ replies, xml ) Need Help??


in reply to Re^3: String concatenation
in thread String concatenation

Hmmm.

$ perl -MO=Terse -e '$v1.$v2.$v3' LISTOP (0x9dc5fe0) leave [1] OP (0x9dc6768) enter COP (0x9dd0650) nextstate BINOP (0x9dd06e0) concat [2] BINOP (0x9dd05b0) concat [1] UNOP (0x9dd0688) null [15] SVOP (0x9dd07e8) gvsv GV (0x9dcaa30) *v1 UNOP (0x9dd0578) null [15] SVOP (0x9dd0630) gvsv GV (0x9dcaa58) *v2 UNOP (0x9dd05d0) null [15] SVOP (0x9dcf9e0) gvsv GV (0x9dcaae4) *v3 -e syntax OK $ perl -MO=Terse -e '"$v1$v2$v3"' LISTOP (0x8b92778) leave [1] OP (0x8b88768) enter COP (0x8b92650) nextstate UNOP (0x8b926e0) null [67] OP (0x8b918d0) null [3] BINOP (0x8b925d0) concat [2] BINOP (0x8b925b0) concat [1] UNOP (0x8b92688) null [15] SVOP (0x8b927e8) gvsv GV (0x8b8ca44) *v1 UNOP (0x8b92578) null [15] SVOP (0x8b92630) gvsv GV (0x8b8cb34) *v2 UNOP (0x8b91920) null [15] SVOP (0x8b91a10) gvsv GV (0x8b8cae4) *v3 -e syntax OK
Similar, but subtle differences.


Comment on Re^4: String concatenation
Download Code
Re^5: String concatenation
by Eliya (Vicar) on Apr 11, 2012 at 21:35 UTC

    What actually executes is the same:

    $ perl -MO=Terse,-exec -e '$v1.$v2.$v3' OP (0x16e5ad0) enter COP (0x1817650) nextstate PADOP (0x16e6eb0) gvsv GV (0x16e3b68) *v1 PADOP (0x16e5b80) gvsv GV (0x16e3b98) *v2 BINOP (0x16e5a50) concat [3] PADOP (0x16e4c00) gvsv GV (0x16bee88) *v3 BINOP (0x16d5aa0) concat [5] LISTOP (0x16e4ca0) leave [1] -e syntax OK $ perl -MO=Terse,-exec -e '"$v1$v2$v3"' OP (0x1ecc200) enter COP (0x200d6b0) nextstate PADOP (0x1edac60) gvsv GV (0x1ed9b80) *v1 PADOP (0x1edbd40) gvsv GV (0x1ed9ca0) *v2 BINOP (0x1edba90) concat [3] PADOP (0x1edba50) gvsv GV (0x1eb4e88) *v3 BINOP (0x1ecbaa0) concat [5] LISTOP (0x1edb9d0) leave [1] -e syntax OK

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-11-28 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (193 votes), past polls