Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Alternatives to sed + awk



2011/3/3 Nikolay Elenkov <nick@example.com>:

> You can have as many curly braces [in Ruby] as you want:
>
> if foo: #{
>    print "foo"
> #}
> else: #{
>    print "bar"
> #}

*plonk*

You can have semiconlons too, if you must:

if foo: #{
   :noop; print "foo"
#}
else: #{
   :noop; print "bar"
#}

bar = 123; bar += 456 unless bar.blank?; puts bar; :noop

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links