faqts : Computers : Programming : Languages : Perl : Common Problems : Arrays

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 15 people (73%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How do I loop through an array?

Jun 16th, 2001 11:01
Per M Knutsen,


Use foreach. Example:
foreach $element (@array) {
   print $element;
}