Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Reversed .= operator

by raiph (Deacon)
on May 03, 2016 at 06:26 UTC ( [id://1162066]=note: print w/replies, xml ) Need Help??


in reply to Re: Reversed .= operator
in thread Reversed .= operator

I prefer your solution but for interest here's another using the arg swap metaop:
my $foo = 'foo'; $foo ~= 'bar'; say $foo; # 'foobar' $foo [R~]= 'bar'; say $foo; # 'barfoobar'

Replies are listed 'Best First'.
Re^3: Reversed .= operator
by Laurent_R (Canon) on May 03, 2016 at 20:58 UTC
    Thanks, raiph, I did not know about that reverse argument operator.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found