NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Perl, French and Japanese (Score:1)
This is a comment from another French monger which doesn't have an account on user.Perl yet, and asked for someone to post it. So here it is.
-----
Well, I'm also a French native speaker and I must admit that I too made this mistake when I first learnt Perl, but I had to accept that "$" had to be used to access a single element and "@" to access the whole array. Actually, Perl's scalar and lists contexts still aren't really clear to me but the more I write Perl, the more I get used to it. I don't even try to understand why I have to do so, which may be a bad behaviour, but I came to just know when I must use this or that.
But, now I consider what you wrote, I now *know* that I should use "@" to use a slice, but then, what is the difference between the single value
$array[$i]and the single element slice@array[$i]? This particular example shows the problem when trying to adapt a thought language to a naturally evolved language such as French. I can't think of such a plural in French. Or maybe "une paire de ciseaux" which would equal the English "a pair of trousers", but that's become a kind of evolution of an exception and isn't a general rule.On the other hand, I also speak Japanese, which is a language without plural, and this "$/@" stuff might be the reason why a Japanese guy invented Ruby :)
Moreover, learning such a different language such as Japanese has taught me to admit rules at first sight, and then to try to understand them if I ever see an etymological explaination or how Perl manipulates this in its core. But for this, one needs a lot of knowledge of the language....
I hope that it answers your question,
Sincerely, Axioplase
Close the world. txEn eht nepO
Reply to This