http://qs321.pair.com?node_id=586360


in reply to Re^5: Why am I getting "premature end of script header"?
in thread Why am I getting "premature end of script header"?

well, I have a package that has a few separate programs, and I want the variables to be shared by all of them. I use my for local variables, but the variables that i want shared i just dont declare... i tried to use our on them, but it had unintended consequences that I couldn't figure out...

Replies are listed 'Best First'.
Re^7: Why am I getting "premature end of script header"?
by lokiloki (Beadle) on Nov 27, 2006 at 23:17 UTC
    I also tried to use use vars qw($name) but that didnt work either...
      We could help you identify the source of those problems, but only if you provide enough information. Saying unintended consequences and didnt work either doesn't give us anything to work with.
        I will try to test and see what the result was... I did this several years ago, and I am not sure why I commented out the our declarations... part of the problem is that my little script is so complex that it often takes a long time to find the corner case where the problem occurs...