Submitted by legacy (Wed Oct 29 10:10:59 UTC 2003)
while gets
print $_.instance_eval { ... }
endThis 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"'
Comments | Current voting | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
RCRchive copyright © David Alan Black, 2003-2005.
Powered by .