Ok.. thats what I thought...
thanks Lou
.. in my 5 year mission to wrap my brain around perl.


----- Original Message -----
From: "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]>
To: "Luinrandir" <[EMAIL PROTECTED]>
Cc: <beginners@perl.org>
Sent: Monday, July 25, 2005 2:27 PM
Subject: Re: Package/modual question -- more


> On Jul 25, Luinrandir said:
>
> > Question 1:
> > should this be a package.pl or a modual.pm?
>
> If you want to be able to source the file via the
>
>    use ModuleName;
>
> then the file must end in '.pm'.
>
> > Question 2:
> > so I need to
> > require 'package.pl';
> > but
> > use 'modual.pm';
>
> The syntax is
>
>    use ModuleName;
>
> with no quotes, and no '.pm' at the end.
>
> > I'm still a bit cloudy on the differences.. other than modual is a
package
> > but a package is not a modual.
>
> A module is a file with a '.pm' extension.  Modules usually define at
> least one package, sometimes more.  A package is a namespace, a
> compartment to hold variables, functions, etc.
>
> > Question 3:
> > I am using this.
> > ReadWrite:WriteData($filename,@Data);
> > In teh package am I to use $_[0] and $_[1]?
> > or can I use $filename and @Data?
>
> In your ReadWrite package's WriteData() function, you will get the
> arguments from @_.  $_[0] will correspond to $filename, and everything
> from $_[1] to the end of @_ will correspond to the elements in @Data.
>
> --
> Jeff "japhy" Pinyan         %  How can we ever be the sold short or
> RPI Acacia Brother #734     %  the cheated, we who for every service
> http://japhy.perlmonk.org/  %  have long ago been overpaid?
> http://www.perlmonks.org/   %    -- Meister Eckhart
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to