CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
array slice *DELETED*

 



sttring
Deleted

Jan 17, 2001, 11:32 AM

Post #1 of 3 (530 views)
array slice *DELETED* Can't Post

Duplicate post deleted by Jasmine

See http://forums.perlguru.com/showflat.pl?Cat=&Board=Forum2&Number=7670&page=&view=&sb=&vc=1

(This post was edited by Jasmine on Jan 17, 2001, 11:11 AM)


perlplexer
Deleted

Jan 17, 2001, 12:04 PM

Post #2 of 3 (526 views)
Re: array slice [In reply to] Can't Post

@fred = ("a", "bb", "ccc",1,2,3);

"@fred[ @fred[ 4,5 ] ] "

You have a nested structure there. First, Perl takes
@fred[ 4, 5 ] and gets "2, 3" (look at your array). The resulting thing is @fred[ 2, 3] which refers to elements 'ccc' and '1'.

--perlplexer



sttring
Deleted

Jan 17, 2001, 12:08 PM

Post #3 of 3 (522 views)
Re: array slice [In reply to] Can't Post

Thank you very much. I'm a little embarressed I couldn't figure that out myself. :)

Thanks,
sttring


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives