3 ms·
What does this have over the default ruby? cat your-file.txt | ruby -ne '$_.your_ruby_stuff' Just syntactic sugar? (it does look cleaner!)
by meow_mix 8y ago
What does this have over the default ruby?
cat your-file.txt | ruby -ne '$_.your_ruby_stuff'
Just syntactic sugar? (it does look cleaner!)
- star-techate 8y agoMy guess is that the author was unaware of those flags. matz's idea that Ruby be a worthy successor to Perl was sort of crushed by Java weenies when the Pickaxe book came out. I know this is ancient history.
- hboon 8y agoI've always found it quite painful to do string escaping when using `ruby -e`
- redka 8y agoExactly! It's nothing fancy but this small sugar makes Ruby more handy in those situations