Re: translate Perl diamond operator to Ruby.
Perl:
while(<>){
...
}
Ruby:
ARGF.each do |$_|
...
end
At this point I question whether I'd ever use Perl for anything again. Until now, Perl filled a niche where if the code I wanted to write would fit in 10 lines or so, and did a lot of string manipulation, I'd turn to Perl. Otherwise Python. Now I think I'll just use Ruby for everything 
Substring in C# (and Java) throw an exception if you take a substring and give it a length (or a starting position) that puts you after the end of the string. That's basically to ensure that you always get a string that's exactly the length you want? Rather than just being able to take a substring and not having to worry about it, you have to include code like the following around every single substring you ever take:
if (str.Length > 30){
str = str.Substring(0, 30);
}
Typically when you take a substring you want to ensure that your string is no longer than a certain number of characters. I can't think of a situation that would it a good idea for the language to enforce that you can't get a string that's less than the maximum length you want instead of exactly the length you want.
On the other hand, most of the dynamic languages (PPPR) let you substring off the end of the string without worrying about it.
Court rejects death penalty for raping children - Yahoo! News
:)...
Keith: Jul 4, 11:32am