Also see
Read a static file from module directory, which is a similar situation. You may be able to use
$0 in conjunction with
File::Basename to identify the location of your script and back track your way to the right lib directory. But I think the other posters' solutions are a little more elegant.