Joel VanderWerf
10/3/2008 5:55:00 PM
Jack Smith wrote:
> It seems that I have to place all the methods I have created at the top
> of my script in order to be able to call them later on in the script.
>
> Is there a way for me to put all my methods at the bottom of the script
> and still be able to call them at the top of the script?
Sure,
====== one way =====
END {
foo
}
def foo
puts "Foo!"
end
====== another way =====
foo
BEGIN {
def foo
puts "Foo!"
end
}
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407