Wednesday, October 19, 2022

Return sum of two numbers using a subroutine in perl

 

sub sum{
   return @_[0] + @_[1];
}

print sum(10, 5);

No comments:

Post a Comment