Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: (MeowChow) Re2: Arrow Operator Oddment

by Cody Pendant (Prior)
on Jun 03, 2002 at 11:09 UTC ( #171192=note: print w/ replies, xml ) Need Help??

in reply to (MeowChow) Re2: Arrow Operator Oddment
in thread Arrow Operator Oddment

Can you explain that a bit for those less enlightened monks?

I'm a bit baffled. I don't see what the problem is.

($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;

Comment on Re: (MeowChow) Re2: Arrow Operator Oddment
Download Code
Replies are listed 'Best First'.
Re: Re: (MeowChow) Re2: Arrow Operator Oddment
by bjelli (Pilgrim) on Jun 03, 2002 at 11:17 UTC

    The problem is: MeowChow created a normal Array and a normal Hash:

    @l = 0..10; %h = (a => 1, b => 2);

    But then read from them as if they were a reference to an array and a reference to a hash:

    print @l->[4]; # prints 4 print %h->{b}; # prints 2

    This would be the normal way to access the array and the hash:

    print $l[4]; # prints 4 print $h{b}; # prints 2
    Brigitte    'I never met a chocolate I didnt like'    Jellinek
      Thank you for clearing that up.
      ($_='jjjuuusssttt annootthheer pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2016-02-09 13:15 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (315 votes), past polls