Skip to content
☈king edited this page Nov 19, 2012 · 3 revisions

Like Perl and Awk before that, defines a block to be run after the others:

p 1
END { p 4 }
p 2
END { p 3 }
# …prints these out as 1, 2, 3, 4

See also: BEGIN (Not to be confused with lower-case end)

Clone this wiki locally