Im not looking to cheat, just a push in the right
direction.
This is assignment has to do with objects, classes,
packages, classes.
There is a text file that is comma delimited that we
will have to get data from.
The methods and what they will do are all layed out
for us. I am stuck on creating the constrctor method,
becasue the instructor gives us this:
The field format of the file is structured like this:
"Car Number":"Driver Name":"Sponsor":"Owner":"Crew
Chief":"Car Make":"Mini Biography":"Team Name"
--------------------------------------------------------------------------------
To accomplish this project you must create a class and
a Perl application to access the methods and data you
create in your class.
--------------------------------------------------------------------------------
Specifications for Class:
Name: Nascar.pm
Description:
A package for displaying and searching a Nascar
driver's information.
Attributes:
->Title - String title of our data (eg. Winston Cup
2002 Drivers). The constructor method would be a good
place to initialize/create this attribute. An
attribute is simply a key/value pair in the anonymous
hash that makes up your object.
_______________________________
So to this I am very confused and I wrote for my code:
package Nascar;
sub new{
my $obj = {};
$obj => {Title} =""; #Is this initilizing the
attribute?
bless $obj;
}
I dont know why I am just not getting this stuff.
Please help me.
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>