Following in the footsteps of the Right Rev. JavaFan, line 4 won't compile either. Your @fils appears out of the blue and the opening { doesn't have a matching }.

Line 5 doesn't create any problems unless (the indenting suggests otherwise, but...) you don't mean to have the if clause run thru # do  something and on until line 12, but who knows whether do  something is the source of your problem...

Maybe line 4 compiles in your actual script, but not here.

So how are we supposed to help when you have obfuscated the problem.

Please, post a snippet (where snippet <= 20 lines) that actually compiles but still illustrates your difficulty.

And, oh yes, please add use warnings to your scipt. It may or may not help you here, but it surely will alert you to numerous mistakes as you write more code.


In reply to Re: Can't use an undefined value as a symbol reference by ww
in thread Can't use an undefined value as a symbol reference by toniax

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.