Hi all!
I am new to Perl and I am trying to work with a snippet of code I found. The code is not important, the gist is that it has a function and this function is called to produce some results:
use feature qw( say );
sub myfunct{
.....
return $result;
}
say for myfunct($str1, $str2);
The code works just fine and it prints the result on the screen, what I cannot understand are the following:
1) How can I store the result of the function instead of printing it?
2) What is the difference between say and print?