in reply to Subroutine Produces Output but Fails to Return to Parent

Hi vegasjoe,

Can you show us what you do get when you print here?  And also what happens when you display it from within the subroutine?

I that if you do something like the following, it should give you more clues ...

use strict; use warnings; # ... #build a dynamic sql statement my $Sql_str = &BuildSQLString($cMssFactBag); print "Debug: Sql_str is: '$Sql_str'\n"; sub BuildSQLString { # ... $dynam_Sql_stmt = join(" ",$dynam_Sql_stmt, "from $p_str_tblName where RECORDXFEREDTOFILE = 'I'"); print "Debug: in BuildSQLString: '$dynam_Sql_stmt'\n"; return $dynam_Sql_stmt; }

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/