I want my overloaded operator sub join to return the array @meep, so I can access it in main. What needs to be the return value of the sub for this to work?
package aniftypackage; use overload ("." => "join_files"); # assume a working new sub is here; sub join { @meep = ("meep1", "meep2"); return @meep; } package main; $foo1 = new aniftypackage; $foo2 = new aniftypackage; $foo1 = $foo1.$foo2;
In reply to Returning an array from a sub in a package by jryan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |