V
Vetrivel Vetrivel
I have written some of the funcions in a file . The filename is test.rb
Examples
test.rb has only the following functions .
def hai(a,b)
puts "This is Hai"
end
def hellow
puts "This is Hellow"
end
In check.rb I have required test.rb file . Then I used below hai method.
It works .
The check.rb file has
require 'test'
hai(1,2)
When I running this program in command line it works . But I am calling
check.rb program from perl using system call . Some times it works fine
Some time It doesn't work . I got some error in my code . The Error
is ' Wrong no of argument error' .
system(check.rb).
I am running above code from perl . To check the problem , I am
redirecting the stderr to a file . I got Wrong 'no of argument error' .
check.rb is an executable file .
My Solution
I think that we should not require a file without module . I
request you t share your experience .
Examples
test.rb has only the following functions .
def hai(a,b)
puts "This is Hai"
end
def hellow
puts "This is Hellow"
end
In check.rb I have required test.rb file . Then I used below hai method.
It works .
The check.rb file has
require 'test'
hai(1,2)
When I running this program in command line it works . But I am calling
check.rb program from perl using system call . Some times it works fine
Some time It doesn't work . I got some error in my code . The Error
is ' Wrong no of argument error' .
system(check.rb).
I am running above code from perl . To check the problem , I am
redirecting the stderr to a file . I got Wrong 'no of argument error' .
check.rb is an executable file .
My Solution
I think that we should not require a file without module . I
request you t share your experience .