Donnerstag, 25. Dezember 2008

print out environment variables

ENV.each do |e|
p e

ENV: array of arrays

p: something like print or puts but better, doesn't interpolate!

ENV.each: iterate in a block each item of array ENV

do .. end: blocks

|e|: pipe, there is the block parameters

["SHELL", "/bin/bash"]
["TERM", "xterm"]

Keine Kommentare:

Kommentar veröffentlichen