'join' glues stuff together, with the string you specified as the glue.
You only have four spaces between your five fingers. Notice you don't get a trailing zero either...
To do what you want using a similar approach:
my @numbers = (4,7,11,14);
my $start='0 ';
print $start, join (" $start" , @numbers),"\n"; # notice the added space in the join string, but not the prefix string
--Dave
In reply to Re: array join missing zero and space
by armstd
in thread array join missing zero and space
by redmustang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |