Gossamer Forum
Home : General : Perl Programming :

Using a package

Quote Reply
Using a package
Hi guys,
I have a package in a seperate file called select.fields like so,
Code:
package select;

@Season = (

'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December');

return( 1 );

I have included it with
Code:
require "select.fields";
and now I`m trying to use it with
Code:
@fields = @select::$name;
where $name is a variable passed in with the value Season.

But no matter how I try I cannott get it working, I figure something in the @fields = @select::$name; is screwing it up, it just wont make @fields the values of @select::$name

Any ideas welcomed, thanks.

chmod
Subject Author Views Date
Thread; hot thread Using a package chmod 5836 May 7, 2002, 2:17 AM
Thread; hot thread Re: [chmod] Using a package
Paul 5718 May 7, 2002, 2:41 AM
Thread; hot thread Re: [Paul] Using a package
Wil 5747 May 7, 2002, 2:45 AM
Thread; hot thread Re: [Wil] Using a package
Paul 5755 May 7, 2002, 2:47 AM
Thread; hot thread Re: [Paul] Using a package
Wil 5725 May 7, 2002, 2:52 AM
Thread; hot thread Re: [Wil] Using a package
Paul 5730 May 7, 2002, 2:54 AM
Post; hot thread Re: [Paul] Using a package
Wil 5667 May 7, 2002, 3:04 AM
Thread; hot thread Re: [chmod] Using a package
Anton_P 5724 May 7, 2002, 2:47 AM
Thread; hot thread Re: [Anton_P] Using a package
chmod 5682 May 7, 2002, 2:58 AM
Thread; hot thread Re: [chmod] Using a package
Paul 5727 May 7, 2002, 3:02 AM
Post; hot thread Re: [Paul] Using a package
chmod 5713 May 7, 2002, 3:04 AM
Thread; hot thread Re: [chmod] Using a package
chmod 5760 May 7, 2002, 3:33 AM
Thread; hot thread Re: [chmod] Using a package
Paul 5718 May 7, 2002, 3:41 AM
Thread; hot thread Re: [Paul] Using a package
chmod 5715 May 7, 2002, 3:59 AM
Post; hot thread Re: [chmod] Using a package
Paul 5692 May 7, 2002, 4:28 AM
Post; hot thread Re: [chmod] Using a package
Alex 5666 May 7, 2002, 10:44 AM