Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Get Element inArray

by K_M_McMahon (Hermit)
on May 25, 2005 at 02:54 UTC ( [id://460222]=note: print w/replies, xml ) Need Help??


in reply to Re: Get Element inArray
in thread Get Element inArray

gopalr said my $res=@arr[-2]

I think you mean my $res=$arr[-2];
If you have warnings turned on (which we all should!) it doesn't like the @arr[-2] method. When referring to a scalar element of an array you should specify that it is scalar with $

-Kevin
my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found