I have some working code. One line of it smells. That line is:
my ($key, undef, undef, undef, undef, undef, $val) = split(/\s+/, $_);It seems to me to be inelegant to repeat undef. I tried the suggestions in Generating an array of n identical elements and the replies, but they threw error messages when used in a my statement. Is there a more elegant idiom?
Regards,
John Davies
Update: Thanks, all, for scratching my itch!
In reply to [Solved] Avoiding repeated undefs by davies
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |