develooper Front page | perl.beginners | Postings from October 2009

Array's

Thread Next
From:
Slick
Date:
October 5, 2009 13:49
Subject:
Array's
Message ID:
844121.48763.qm@web55501.mail.re4.yahoo.com
Just clarification.  At this time I have not written any of my code (dont' know where to begin yet, however the website that I am looking at perl.begin.org seems to have diffrent methods for one item.  I have seen @ for arrays written like this:   @myarray ,but I have also seen an array per the perl.begin.org writting like:    $primes[$num_primes].  Are they both the same? Because it would be easier in my opinion to write:

@myarray = 4;
 instead of writing this:  
$primes[$num_primes] = 2;  

Am I mising something, or are these two things interchangable?
 Jason H. Owens 


      
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About