I'm fairly new to perl so sorry if this is a newbie question.
As far as I understand perl, I can do this:
sub BuildAndroidRessourceArgument()
{
my @xmlResFiles = @_;
my $fileCnt = @_;
my $index = 0;
my $aaptResArg = "-F ";
foreach( @xmlResFiles )
{
$index = $index + 1;
if( $index == $fileCnt )
{
$aaptResArg = $aaptResArg.$_;
}
else
{
$aaptResArg = $aaptResArg.$_." -F ";
}
}
print "$aaptResArg\n";
return( $apptResArg );
}
When I print my aaptResArg in here I have the correct value but then:
my ( $aaptResArg ) = BuildAndroidRessourceArgument( @xmlResFiles );
print "$aaptResArg\n";
When I print after returning the value it prints nothing.
So as far as I know this code should work, if it prints in the function their's no reason why it shouldn't print when returning the value right ?