in reply to how to alternate join?
my @datafiles = map { "file".$_ } 1..7; printf "files available=\n%s\n", join("\n", # 4) glue w/your newlines grep { $_ } # 3) exclude blank elements created by + split() split(/([^,]+, [^,]+, )/, # 2) split on pairs join(", ", @datafiles) # 1) glue big ,-delim string ) ) ;
|
|---|