IS it possible to create context sensitive functions?
Ie. The function returns different results depending on what context it's called?
my @array =someFunction();
my $scalar =someFunction();
If the function is called in array context I want to return an array, but if it's called in scalar context I want to join the array and return the results....
Ie. The function returns different results depending on what context it's called?
my @array =someFunction();
my $scalar =someFunction();
If the function is called in array context I want to return an array, but if it's called in scalar context I want to join the array and return the results....