in reply to Can't use string ("blah") as an ARRAY ref while "strict refs" in use at..

Given that @database_urls gets populated with:

my $url = $row[0]; push (@database_urls, $url);

That is, it's an array of strings, Perl is telling you that:

my $host = $databases[$i][0];

... $databases[$i] contains a string, not an array reference. You're going to have to get the host and database some other way.

Replies are listed 'Best First'.
Re^2: Can't use string ("blah") as an ARRAY ref while "strict refs" in use at..
by kdmurphy001 (Sexton) on Mar 27, 2009 at 06:09 UTC
    Ended up using a foreach loop and modified the subroutine a bit and the script as a whole. Looks to be working. Thank you so much for your help and that link looks very interesting. Looking forward to reading that. Thank you again! I might try that data dumper idea as well, not familiar with that but always looking for new ways to do a task.
      I'm getting this error and I've tried for hours to get past it but having no luck
      When your program is small it is easy to debug with print, if your program becomes big you have to look for debuggers, see perldebtut and Devel::SDB, it is the time to debug your code yourself.
      see here http://s9.video.blip.tv/1340001748348/Kraman-DevelsdbSmartDebugger804.swf for a webcast

      Vivek
      -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.