Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: Re: First char out of a string & surprises with errors on chop reverse $string (that doesn't work!)

by eduardo (Curate)
on Dec 26, 2001 at 22:03 UTC ( #134443=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: First char out of a string & surprises with errors on chop reverse $string (that doesn't work!)
in thread First char out of a string & surprises with errors on chop reverse $string (that doesn't work!)

Definite agreement... reverse $foo = "merlyn"; makes little to no sense. However, chop reverse $foo; does seem relatively reasonable... (though I see how it quickly goes to hell in a handbasket.) I remember when in my Data Structures in C++ class they tried explaining the reason to overload some operators as lvalues, and some not... it always seemed like you could *find* a scenario where you may want that functionality (though I doubt 2 + 2 = $foo; would ever be a good one :) Well... thanks to everyone for the answers! I am going to agree that it really makes very little sense to let reverse return an lvalue... though I think the obfuscation "value" alone may warrant it :)
  • Comment on Re: Re: Re: Re: First char out of a string & surprises with errors on chop reverse $string (that doesn't work!)
  • Select or Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: First char out of a string & surprises with errors on chop reverse $string (that doesn't work!)
by Juerd (Abbot) on Dec 26, 2001 at 22:08 UTC
    though I doubt 2 + 2 = $foo; would ever be a good one :)
    "2 + 2 equals $foo, for certain values of 2"... hmmm...

    No, really, i think 2 + $bar = 3 would be a nice way to write $bar = 1, but _very_ hard to make.

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://134443]
help
Chatterbox?
[karlgoethebier]: ...because of sausage and luncheon meats...
[karlgoethebier]: ... the ultimate coding experience for everyday people...
[karlgoethebier]: ...like me
[marto]: what a mess
[karlgoethebier]: perhaps i need a zerial?
[Corion]: marto: Heh - I think that's a nice contractual trap, "you will not use other gods/engines besides ours" ;)
[Corion]: But if the base intention was to have CIG as "co-developers" who (have to) contribute changes back to the mainline, it makes sense to have them use no other engine
[marto]: yes, I hear that development house has been on its last legs for a couple of years now
[Corion]: Is anybody aware of what makes Android Oreo better than Android Nougat? I'm not sure if the architectural changes (etc) are there already that make upgrading an Oreo-kernel phone to a newer Android userland (Lineage OS) version feasible
[Corion]: Yeah, CryTek got blindsided (or whatever) by Unity and Unreal Engine being zero cost, and the CryTek documentation being bad/nonexistent I think

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-12-14 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?