Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: reversed hash doesn't identify keys

by johngg (Abbot)
on Dec 11, 2012 at 23:22 UTC ( #1008426=note: print w/ replies, xml ) Need Help??


in reply to Re: reversed hash doesn't identify keys
in thread reversed hash doesn't identify keys

reverse works on scalar strings as well!

$ perl -Mstrict -Mwarnings -E ' > my $word = q{Constantinople}; > my $drow = reverse $word; > say $drow;' elponitnatsnoC $

I hope this is of interest.

Cheers,

JohnGG


Comment on Re^2: reversed hash doesn't identify keys
Download Code
Re^3: reversed hash doesn't identify keys
by roboticus (Canon) on Dec 12, 2012 at 02:24 UTC

    johngg:

    I've been writing perl for a good while now, and I'm frequently surprised at what I don't know.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Re^3: reversed hash doesn't identify keys
by holly_71 (Initiate) on Dec 13, 2012 at 23:42 UTC

    Thanks very much! I had one too many "reverse"s in there and it was reversing the reversed letters back...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2014-07-22 17:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (121 votes), past polls