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

Re: How to access each element in an array Perl

by 2teez (Priest)
on Jan 18, 2014 at 12:40 UTC ( #1071097=note: print w/ replies, xml ) Need Help??


in reply to How to access each element in an array Perl

...How to do this please let me know.
How would you do it? How do I post a question effectively? might also do.
Howbeit, to give a headup doing thus is one way of getting your desired output:

my @arr = qw(Larrywall); print substr( $arr[0], index( $arr[0], q[y] ), 1 );
Please check index and substr. Also please note what choroba said.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re: How to access each element in an array Perl
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-07-28 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls