hi dear members!
i am new in Perl community i want to declare a function and try to pass some
parameters same as i do in php. First i declare a function (umar).
sub umar ($width, $height) {
$area = $width * $height / 2;
return $area;
}
after that is I call function through a variable
$result = umar(10,40);
print "$result\n";
But it did't work and i got a error
Illegal character in prototype for main::umar : $width,$height at ./test.pl
line 7.
Malformed prototype for main::umar: $width,$height at ./test.pl line 12.
please help me what should i do?
Regards,
Umar Draz
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
starting at 1ยข/min.