Hmmm... my test code (without my @x) didn't trigger that warning, but then I was passing arrays and not hard-coded lists of data. I think you would get that problem if you were calling csv_join('a', 'b', 'c') for example.
Hard coded lists would also be a problem with the \@ prototype since it needs to take a reference to the array that was passed to csv_join('a','b','c') and hard coded lists
don't have references. In fact, you would get something like this if the prototype is \@ and you called csv_join('a', 'b', 'c')
Type of arg 1 to main::csv_join must be array (not constant item) at M
+onks/QuickCsvJoin.pm line 33, near "'c') "
Too many arguments for main::csv_join at Monks/QuickCsvJoin.pm line 33
+, near "'c') "
If you need to make calls like csv_join('a','b','c') rather than csv_join(@aFields), then you will have to pass the array rather than just a reference to it. I've updated the original reply with the alternative. See above.
Best, beth | [reply] [d/l] [select] |