Comment on this RCR (edit wiki page) | RCRchive home

RCR 164: New interpreter switch

submitted by martindemello on 2003-10-29 02:32:59


This is a legacy RCR. If this is your RCR, please resubmit it using the new format and process.


It'd be useful to have a switch for the following implicit loop:

while gets
  print $_.instance_eval {
    ...
  }
end
This would help the common use pattern of piping a series of lines through a script.

Old:

ruby -n -e 'puts $_.split.join(" | ")'
ruby -p -e '$_ = $_.split.join(" | ") + "n"'

New:

ruby -j -e 'split.join(" | ") + "n"'
ruby -j -e 'split.join(" | ").newline"'

Vote for this RCR

Strongly opposed [0]
Opposed [1]
Neutral [3]
In favor [3]
Strongly advocate [1]

Change the status of this RCR to:

accepted

rejected

withdrawn


Add comments here

Back to RCRchive.


RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog