Easy way to print Perl array? (with a little formatting)

后端 未结 11 703
猫巷女王i
猫巷女王i 2021-01-30 10:13

Is there an easy way to print out a Perl array with commas in between each element?

Writing a for loop to do it is pretty easy but not quite elegant....

11条回答
  •  情歌与酒
    2021-01-30 10:23

    This might not be what you're looking for, but here's something I did for an assignment:

    $" = ", ";
    print "@ArrayName\n";
    

提交回复
热议问题