3 ms·
They have been setting the global variable before. This is not a new behaviour. I think it was to match Perls behaviour iirc
by Lukas_Skywalker 10y ago
They have been setting the global variable before. This is not a new behaviour. I think it was to match Perls behaviour iirc
- toolz 10y agoAhh, thanks for the clarification I had no idea this was old behavior but it looks like the new method might allow them to deprecate what I would consider an anti-feature later.
- anamoulous 10y agoThis is the kind of stuff that is great for shell scripting / one liners. I doubt they are ever going deprecate it. Maybe the best thing is to rewind your mind 30 minutes and pretend you never read about it : ) Example ruby -ne 'puts $1 if $_ =~ /^(([\d\.])+)/' < /etc/hosts
- toolz 10y agoI knew things would make sense the more I learned about it. Thanks, TIL. Now I'll pretend I never knew about this so I'm never tempted to abuse it.