in reply to Perl style: Arguing against three-argument join()
Is $item something like ','? If so your examples beccome
1) join '', $config{'prefix'}, ',', $config{'suffix'} 1.5) join ',', $config{'prefix'}, $config{'suffix'} 2) join ',', @config{'prefix', 'suffix'} 3) $config{'prefix'} . ',' . $config{'suffix'}
In which case 2 is the clear winner with 1.5 just behind it. I definitly would never use 1 because there is no point in adding the join '' if you could just change the commas to periods and move on.
|
|---|