in reply to Re: Out of memory!
in thread Out of memory!

Dasgar('dbi:ODBC:MSSQL','Url.txt'); Dasgar('dbi:ODBC:MSSQL','Url_Ex.txt'); sub Dasgar { my( $dbstring, $filename ); ..DBI->new($dbstring); ...open ... $filename ... }

Replies are listed 'Best First'.
Re^3: Out of memory!
by dasgar (Priest) on Aug 11, 2010 at 15:37 UTC

    Oh no! I've been reduced to a subroutine! :D

    Although I almost suggested a subroutine solution, I opted for a conceptual answer rather than going the code route. However, since he's doing slightly different SQL queries from the databases, I would recommend that the SQL query be another parameter to be passed into the subroutine.

    Otherwise, it looks like you've managed to read my mind. Now if only I can get Perl to do that, I wouldn't have to worry about making mistakes in my code.