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 7111 May 7, 2002, 2:17 AM
Thread; hot thread Re: [chmod] Using a package
Paul 6975 May 7, 2002, 2:41 AM
Thread; hot thread Re: [Paul] Using a package
Wil 7004 May 7, 2002, 2:45 AM
Thread; hot thread Re: [Wil] Using a package
Paul 7011 May 7, 2002, 2:47 AM
Thread; hot thread Re: [Paul] Using a package
Wil 6982 May 7, 2002, 2:52 AM
Thread; hot thread Re: [Wil] Using a package
Paul 6987 May 7, 2002, 2:54 AM
Post; hot thread Re: [Paul] Using a package
Wil 6924 May 7, 2002, 3:04 AM
Thread; hot thread Re: [chmod] Using a package
Anton_P 6982 May 7, 2002, 2:47 AM
Thread; hot thread Re: [Anton_P] Using a package
chmod 6939 May 7, 2002, 2:58 AM
Thread; hot thread Re: [chmod] Using a package
Paul 6984 May 7, 2002, 3:02 AM
Post; hot thread Re: [Paul] Using a package
chmod 6971 May 7, 2002, 3:04 AM
Thread; hot thread Re: [chmod] Using a package
chmod 7017 May 7, 2002, 3:33 AM
Thread; hot thread Re: [chmod] Using a package
Paul 6975 May 7, 2002, 3:41 AM
Thread; hot thread Re: [Paul] Using a package
chmod 6975 May 7, 2002, 3:59 AM
Post; hot thread Re: [chmod] Using a package
Paul 6949 May 7, 2002, 4:28 AM
Post; hot thread Re: [chmod] Using a package
Alex 6923 May 7, 2002, 10:44 AM