I've defined a path (say, $MYPAT) in .bashrc file and I would like to use it in perl scripts, so that inside the script I just can write open(IN, "<$MYPAT/dir1/... How can I import this variable to directly use it in my script? 
I guess is the same problem posted here How to use aliases defined in .bashrc in shell script but applied to perl.
Thank you!