in reply to Value Fill

You could use backtics `mysql -u root -ppassword somedb` or system using the single or multi arg syntax or Expect.pm What is best (and/or will work) depends on what you are trying to do with what external executable and if security is a major or minor issue.

For many things you might do via system there is a Perl equivalent or interface just to add to the options.

doc