Forgot to mentioned, I have use strict;

You should also be using warnings (or -w) because then you would see:

Variable "$targetSheet" will not stay shared at - line 46. Variable "$row" will not stay shared at - line 47. Variable "$col" will not stay shared at - line 47. Variable "$group" will not stay shared at - line 47. Variable "$assert" will not stay shared at - line 47. Variable "$ftest" will not stay shared at - line 47. Variable "$mergeAcross" will not stay shared at - line 55. Variable "$mergeDown" will not stay shared at - line 59. Variable "$isComment" will not stay shared at - line 62. Variable "@str" will not stay shared at - line 63. Variable "$isData" will not stay shared at - line 63. Variable "$targetSheet" will not stay shared at - line 68. Variable "$isComment" will not stay shared at - line 73. Variable "@str" will not stay shared at - line 77. Variable "$hvp_col" will not stay shared at - line 78. Variable "$col" will not stay shared at - line 78. Variable "$grp_col" will not stay shared at - line 79. Variable "$ass_col" will not stay shared at - line 80. Variable "$tst_col" will not stay shared at - line 81. Variable "$plan_row" will not stay shared at - line 82. Variable "$row" will not stay shared at - line 82. Variable "$group" will not stay shared at - line 83. Variable "$assert" will not stay shared at - line 84. Variable "$ftest" will not stay shared at - line 85. Variable "$isData" will not stay shared at - line 88. Variable "$targetSheet" will not stay shared at - line 94. Variable "$isData" will not stay shared at - line 95. Variable "$isComment" will not stay shared at - line 95. Variable "@str" will not stay shared at - line 96. Variable "$func" will not stay shared at - line 101. Variable "$compl" will not stay shared at - line 101. Variable "$group" will not stay shared at - line 101. Variable "$assert" will not stay shared at - line 101. Variable "$ftest" will not stay shared at - line 101.

And resolving those would go a long way to explaining the problem you describe in the OP.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^4: scope of variable by BrowserUk
in thread scope of variable by priyo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.