in reply to works in browser but not in prompt

The problem lies in your path. The user the webserver is running as (probably 'nobody') is using a direcoty from with the modules can be seen, but the user from which you are running cannot. It appears this is a unix machine, so doing find /usr -name "DBI.pm" will ler you know where the module lives, and you can manipulate your environment (or @INC) accordingly.
remeber the immortal word's of Socrates who said, "I drank what ?"