seema wrote:
....
> I have got a problem i just want to match old
> C style function definition,
> for example,
> void hiall()
> int k,j,l,m;
> char *dare;
> {
> //BODY OF THE FUNCTION
> }
> If such old C style function definition exists
> then i just need that function name. Hope somebody will
> help a chinless wonder like me
>
> Seema Rao
Please read:
perldoc perlsub
In Perl, functions are "sub"'s, and variables are declared with
"my". So it would go something like:
use warnings;
use strict;
#...
sub hiall{
my $k,$j,$l,$m,$dare;
#pick up incoming arguments if any from array @_
#do stuff
#return a value with the "return" statement, or
#otherwise return the value of the last statement
#executed
}
#...
Note that the type of value a variable may hold is not defined
ahead of time in Perl. Any variable may take on any valid value
at any time during program execution (generally string, integer,
floating point, filehandle, dirhandle, or reference, with
automatic conversion).
HTH.
--
Bob Walton
Email:
http://bwalton.com/cgi-bin/emailbob.pl