sivaramanm has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
When compile my perl program, I got an error as 'Memory Stack overflow'. Pls help me to correct this problem.
Please find my codings
My perl code:-- $file=~s#<tbody>((?:[^<]+|<(?!/?tbody>))+</tbody>(?:\s*<tbody>(?:[^<]+ +|<(?!/?tbody>))+</tbody>)*)#"<tbody>\n".${TableBody(\$1)}."\n</tbody> +"#gies; sub TableBody { my ($line) = @_; $temp = "$$line"; $temp =~s#</tbody>$##; $temp =~s#\t#</para></entry><entry><para>#g; $temp ="<row><entry><para>$temp</para></entry></row>"; $temp =~s#<tbody>#<row><entry><para>#g; $temp =~s#</tbody>#</para></entry></row>#g; return \$temp; } My input is:-- <tbody>one two three</tbody> <tbody>one two three</tbody> <tbody>one two three</tbody> <tbody>one two three</tbody> My output is:-- <tbody> <row><entry><para>one</para></entry><entry><para>two</para></entry><en +try><para>three</para></entry></row> <row><entry><para>one</para></entry><entry><para>two</para></entry><en +try><para>three</para></entry></row> <row><entry><para>one</para></entry><entry><para>two</para></entry><en +try><para>three</para></entry></row> <row><entry><para>one</para></entry><entry><para>two</para></entry><en +try><para>three</para></entry></row> </tbody>
It works well. But if the number of rows in the input exceeds 25, the "Memory stack overflow" error comes.
Pls help me, how to increase stack memory.
thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: stack problem
by jdporter (Paladin) on May 25, 2005 at 10:45 UTC | |
Re: stack problem
by gopalr (Priest) on May 25, 2005 at 05:56 UTC | |
by Cody Pendant (Prior) on May 25, 2005 at 08:26 UTC | |
Re: stack problem
by reasonablekeith (Deacon) on May 25, 2005 at 10:14 UTC |