From: doodpants@... (Karl von Laudermann) Date: 2004-09-17T01:24:48+09:00 Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby? "Robert Klemme" wrote in message news:<2qsugrF13g5akU1@uni-berlin.de>... > "James Edward Gray II" schrieb im Newsbeitrag > news:CBB35FB8-0732-11D9-B224-000A95BA45F8@grayproductions.net... > > > I feel Perl has a slight edge in quick and dirty scripting. Simple > > things like having to call to_s() on the integers I print or > > Under which circumstances do you need to_s for numbers? I can't speak for James, but coming from Java I'm used to using the concatenation operator, like so: print "foo" + 1; This causes an error; you have to call to_s on the number. I find it unintuitive that specifying multible arguments to the print method is a way of concatenating them, so I rarely think to use it. I also find it unintuitive that you don't have to call to_s when passing a non-string argument by itself, but you do when concatenating. Perhaps String#+ should be modified to call to_s on its arguments? BTW, one actual benefit of using concatenation vs. multiple arguments is that you can use puts instead of print to get a "\n" for free at the end, but not in between each component of your string.