> 
> Hi!
> 
> I do not know I am on the right mailing list.
> If not, sorry for the burden.
>

The advocacy list is not the appropriate list, so I have bcc'd it so it
gets dropped from the discussion. Your question is better asked to the
[EMAIL PROTECTED] list, I have copied it so that it is in the discussion.
 
> To say thing briefly:
> I am a programmer for some 25 years using various old and newer languages.
> I have to write some small things in Perl.
> It was fine and fast with some text analysis.
> 
> Now I have to write something using an in-memory "database", i.e. a SINGLE
> table filled with records.
> 
> I am trying to simply add records then retriev them.
> I already spent more than 20 hours for something which should take 30
> minutes....
> 
> Seriousely considering making my customer change his mind and revert to
> plain old C++
> Just to be certain not to miss something simple, I attach a small part
of my
> very, very basic trials.
> 
> As you can see when running this small piece of "code", as soon as you
push
> a new record, all records already existing become
> filled with the new pushed record and it is impossible to get any other...
> 
> Looks like Perl is not able to handle trivial data structure like an array
> of records (or hashes).
> 

Don't sell Perl short because you have not given it enough time to
learn. The reason this is complicated for you isn't Perl's problem, it
is lack of time taken to learn its fundamentals, I would say the same
things about C++. Whether you have that time or wish to do it is up to
you.  Perl can easily handle what you are after using either a Hash of
hashes or an Array of hashes.  Perl has references to handle complex
data structures, similar to what you describe. But including lines such
as "shit language perl" in the comments of a script posted to a group on
advocacy for Perl isn't likely to get you very far. I would suggest
reading through,

perldoc perllol
perldoc perldsc
perldoc perlreftut
perldoc perlref

Before assuming this trivial task can't be handled by Perl, and/or if
you are still interested repost a better question to the beginners list
explaining what you are attempting to do and why it is failing.  You
should also be using 'strict' in all of your code.

I would have devoted more time to your script had your attitude been
better from the start....

http://www.catb.org/~esr/faqs/smart-questions.html

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to