[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Re: Some suggestions



Welll...
OK of course everyone's suggestions for using a hash is the perfect one
for my project . See (while partially disregarding) my last post.
So thinking more in Perl now:

The vendor and family lists are born to be hashes.
The model list should be a hash whose values are anonymous list
references (there are three components to the values) instead of the
tortuous tab delimited construct i was considering.

So is this syntax correct:

%Models =

(model1 => ['vendor1',family1,model1html],
 model2 => ['vendor2',family2,model2html])

and

for each $model keys(%Models)
($vendor,$family,$modelhtml) = $model

or is it
for each @model keys(%Models)
($vendor,$family,$modelhtml) = @model

Much cleaner, very beautiful.

Allan Greenier
AutoScript Applications
http://www.geocities.com/~autoscript
cat picture
http://www.geocities.com/~autoscript/toby.html

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org