shibby has asked for the wisdom of the Perl Monks concerning the following question:
But how would I go about creating a new object for each entry (a new entry is on a new line), for example, my text file database is in the format:open(FILE, $file) or die "Cannot open $file: $!\n"; while(<FILE>) { chomp;($creg, $cname, $attribs) = split(/,/); } close(FILE);
etc. I've been racking my brain to come up with something for days of google'ing, but I've ran out of ideas.. Any help will be lifesaving, litterally! I don't have much time left at all.. :( maybe something likeUNIQUE ID, NAME, ATTRIBS UNIQUE ID, NAME, ATTRIBS
I don't know :( Thank you for your time kind people, Shibbyforeach $line(@file) { chomp;($creg, $cname, $attribs) = split(/,/); $object = $blah->new(); $object->creg($creg); ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: text file database - Objects?
by svsingh (Priest) on May 09, 2003 at 07:02 UTC | |
by svsingh (Priest) on May 09, 2003 at 13:18 UTC | |
by shibby (Initiate) on Jun 05, 2003 at 08:13 UTC | |
|
Re: text file database - Objects?
by djantzen (Priest) on May 09, 2003 at 03:11 UTC | |
|
Re: text file database - Objects?
by nite_man (Deacon) on May 09, 2003 at 06:43 UTC |