2011年10月19日 星期三

he argument to push() must be a real array, not just a reference to such.

if you wanted just to append to a row, you'd have to do something a bit funnier looking:

# add new columns to an existing row
    push @{ $LoL[0] }, "wilma", "betty";
Notice that I couldn't say just:

push $LoL[0], "wilma", "betty";  # WRONG!
In fact, that wouldn't even compile. How come? Because the argument to push() must be a real array, not just a reference to such.

沒有留言:

張貼留言