Hi,
Using this as an example I was trying to understand how to create the code below using an @array rather than a FILE when calling a sub-routine. I am not clear if this is possible or if I am just going about this all wrong.
Thanks for any assistance.
In the begining
Let us first assume that there was nothing to begin with.
Using this as an example I was trying to understand how to create the code below using an @array rather than a FILE when calling a sub-routine. I am not clear if this is possible or if I am just going about this all wrong.
Thanks for any assistance.
Code:
numberoflines = &CountCurrentRecords('ppc_members.dbf');
Code:
sub CountCurrentRecords {
$number = 1;
my($database) = ($_[0]);
open(DATABASE, "$database");
while ($line=<DATABASE>) {
$number++;
}
$number = 0 if $number < 0;
close(DATABASE);
return $number;
}
In the begining
Let us first assume that there was nothing to begin with.