perlpal has asked for the wisdom of the Perl Monks concerning the following question:
@student_list = (tom,harry,jane,amelia);
This array is populated by reading a config file and can change during consecutive runs depending on the config file input.
I need to print a comma-separated list of the students once in a single print statement which rules out the "foreach" loop i could have used.
The output should be read as :
"The list of students is tom,harry,jane,amelia "
any suggestions ?
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Access dynamic array elements
by Corion (Patriarch) on Jun 16, 2009 at 07:24 UTC | |
by perlpal (Scribe) on Jun 16, 2009 at 07:30 UTC | |
|
Re: Access dynamic array elements
by cdarke (Prior) on Jun 16, 2009 at 08:24 UTC | |
|
Re: Access dynamic array elements
by 13warrior (Acolyte) on Jun 16, 2009 at 08:59 UTC | |
|
Re: Access dynamic array elements
by Anonymous Monk on Jun 16, 2009 at 07:32 UTC |