As a non-English native, I used to make a lot of English grammatical and idiomatic mistakes. For example, I would write "I will can climb Mt Everest." instead of "I will be able to climb Mt Everest" and "students learn more knowledge in school" instead of "students lean more in school". Now I'm learning Perl as my first programming language and similarly I've been making a lot of Perl grammatical mistakes along the way. And one thing particularly struck me as odd: with a human language, when grammar is wrong, the meaning still comes across and the talk does not stop there. But when it comes to a computer language, when syntax is botched, everything else is done for. But I'm having a feeling that artificial language grammar may be easier to learn, although Perl is the only such language I know and I know it only superficially.
Well, I've experimented with something like, restructure
while(<>){ y/[A-Z] /[a-z]_/;}
to
y/[A-Z] /[a-z]_/ while(<>);
But when I tried restructuring
while(<>){ if s/ /_/;print lc;}
to
print lc if s/ /_/ while(<>);
I got a syntax error. I then found I could compromise a little and use
s/ /_/ ? print lc : print lc while (<>);
In English, I can put the while ...if...,structure together pretty fine but not in the reversed order. In Perl, I can do it in the reversed order, but looks like I can't have it all my own way. I guess there must be some articles specifically dealing with Perl usage rules or providing guidance on Perl idioms, something like don't put two auxilliary verbs together in some English grammar guide book, something like telling the Perl learner print $_; is redudant, but not something too general like what's on perlfunc manpage.
So can someone kindly recommend me articles, preferably light-weight and interesting, on, I suppose, intermediate-levelish Perl syntax and idioms? Thanks in advance.