http://qs321.pair.com?node_id=733498


in reply to Re: printing arrays
in thread printing arrays

Once you have the list that you want to print; you don't need to use a join join, instead you can just print it with $, set appropriately. $, is also known as $OFS and $OUTPUT_FIELD_SEPARATOR; use perldoc perlvar. This can be much more efficient even with small lists.
my @arr = ( 1, "Ali", 2, "Bobbi", 3, "Charli" ); local $, = " "; print @arr, $/;
Be well,
rir

Updated: join usage

Updated: efficiency comment deleted.