in reply to Need help with mysql dump script

"Usually I can't transform my scripts to use strict... :( "
That's a highly suspect statement on several grounds:
  1. It might mean that you think you refine a script to satisfy strict after you have it working...
    or
  2. ... it might mean you can't understand the error messages you get when you add use strict...
    or
  3. ... you mean something else, equally untoward, that I 'just don't get.

If any of those cases obtain, you need to know
re 1: that's backwards; strict during writing/testing will save you problems AFTER you think you have everything working.
re 2: You really need to review the errors and the docs relating to each, until you do understand why your code produces unexpected outcomes.
re 3: We need clarification.

And, by the way, your initial inclination to mark the error message with <code.../code> tags was correct.