Question:

Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?

Answer:

@arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’)
 
foreach (@arraycontent)
 
{
 
print "$_\n";
 
}

 


Keywords:

© 2017 QuizBucket.org