in reply to Style Point: Catching eval { } errors
How are some of these other things written in Java? (Forgive me for probably getting some of the class/method names wrong, but structurally, this is what it's like):
or hashes:$string =~ s/this/that/ig; --- RegEx re = new RegEx(/this/i); string = string.replace(re,"that","g");
So the Java way is, in general, more wordy and less full of punctuation (well, maybe not by volume of punctuation characters, but, at the very least, the punctuation is more mundane).%hash = ( foo => 'bar', ferd => 'snodgrass', ); $hash{thing}; --- HashTable hash = new HashTable(); hash.add("foo", "bar"); hash.add("ferd", "snodgrass"); hash.lookup("thing");
Don't get me wrong, I'm not being critical of the Java way... I'm just saying that it is different from the Perl way, and that there isn't anything wrong with that.
|
|---|