TheLinuxDuck
09-18-2001, 03:44 PM
Let's say I have a sub:
sub myFunction()
{
return "This string is part of ".
"the return info";
}
:let's say I call it as:
print myFunction, "-Taa daa!!\n";
This works.
However, I don't want to use the '.' concatenation operator. I'd LIKE to be able to do something like:
sub myFunction
{
my($buffer);
print $buffer "This is a part of ",
"the return stuff";
return $buffer;
}
This does not work. but, I'd like to do something similar.
I COULD use join, but the problem is that the sub does lots of error checking and testing and builds a string based on passed parameters, so join wouldn't be the best method.
Why, do you say, do I care? Because I prefer to use the comma separated print list. I'm deranged, according to FoBoT.
sub myFunction()
{
return "This string is part of ".
"the return info";
}
:let's say I call it as:
print myFunction, "-Taa daa!!\n";
This works.
However, I don't want to use the '.' concatenation operator. I'd LIKE to be able to do something like:
sub myFunction
{
my($buffer);
print $buffer "This is a part of ",
"the return stuff";
return $buffer;
}
This does not work. but, I'd like to do something similar.
I COULD use join, but the problem is that the sub does lots of error checking and testing and builds a string based on passed parameters, so join wouldn't be the best method.
Why, do you say, do I care? Because I prefer to use the comma separated print list. I'm deranged, according to FoBoT.