How to loop through an array

If you have an array @myarray and you want to loop through it line by line, you can use the following,

foreach(@myarray)
{
     $line = $_;
     print $line . "\n";
}

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.