# Calling module and function form external file

**URL:** <https://discourse.julialang.org/t/calling-module-and-function-form-external-file/20982>\
**Category:** General Usage\
**Created:** [February 19, 2019, 6:26pm UTC](https://discourse.julialang.org/t/calling-module-and-function-form-external-file/20982 "2019-02-19T18:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suraj\_Pawar](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Suraj\_Pawar](https://discourse.julialang.org/u/Suraj_Pawar)\
**Post date:** [February 19, 2019, 6:26pm UTC](https://discourse.julialang.org/t/calling-module-and-function-form-external-file/20982/1 "2019-02-19T18:26:47Z")

</div>

I have a main.jl as below  
include(“hello.jl”)  
import hello  
hello.foo()

and hello.jl is as below  
module hello  
function foo()  
println(“hello”)  
end  
end

if I run main.jl, I get an error that package hello not found in the current path. Both main.jl and hello.jl are saved on the same path.

---

<div class="post-metadata">

**Author:** ![Simon\_Bolland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simon_bolland/32/8920_2.png) [@Simon\_Bolland](https://discourse.julialang.org/u/Simon_Bolland)\
**Post date:** [February 19, 2019, 10:04pm UTC](https://discourse.julialang.org/t/calling-module-and-function-form-external-file/20982/2 "2019-02-19T22:04:33Z")

</div>

Try:

`import .hello`
