Re: PerlNet to VB App...
by $Bill Luebkert other posts by this author
Dec 9 2004 12:02PM messages near this date
view in the new Beta List Site
Re: Gif counters
|
PerlNet to VB App...
Henning Møller-Nielsen wrote:
> Hi
>
> I have not tested your code, but don't you get the object as the first parameter,
> and the filename as the second?
Yes - isn't that what it says ?
> And doesn't '$datFname = @_;' just give you the
> number of parameters (2)? I would suggest, but untested,
No - only in a scalar context.
I would have written it more like this for clarity :
sub Process1 {
my ($self, $filename) = @_;
my $file = new FileParser::File_Resfile($filename);
return $file-> getResultVer();
}
> sub Process1 {
> my ( $self, $datFname, $file, $Ver );
> ($self, $datFname) = @_;
I tend to handle args first and then deal with local vrbls just
before each is needed - so I woudln't combine the args and vrbls
as above in the first line.
> $file = new FileParser::File_Resfile($datFname);
> $Ver = $file->getResultVer();
> return $Ver;
> }
--
,-/- __ _ _ $Bill Luebkert Mailto:dbecoll@[...].net
(_/ / ) // // DBE Collectibles Mailto:dbe@[...].com
/ ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl.NET mailing list
Perl.NET@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|