in reply to Access dynamic array elements

Assuming that the array is always populated with the names we can print the names in a comma seperated way by using the join function.

Sample Code :

#!/usr/bin/perl use strict; use warnings; my @names = qw (a b d f g ); # This is filled dynamically print join(',',@names);


Output :

->perl a.pl a,b,d,f,g~ >