in reply to Re: calling problem in script
in thread calling problem in script

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^3: calling problem in script
by davorg (Chancellor) on Jun 30, 2009 at 15:21 UTC
    No one suggested me how to modify the if part.

    Actually, three of us told you exactly what was wrong with your 'if' statement.

    When i use use strict; use warnings; it tells me messages like this- Global symbol "$LogDir" requires explicit package name at summaryreport_latest_w orking.pl line 28. i can get rid of that using my and making the variables local, but my problem is diffrent.

    Yes. That's why you add 'strict'. It forces you to declare your variables and think about scope. This increases the quality of your code. And 'warnings' will tell you about many potentially unsafe practices in your program.

    You should really ensure that your code is strict and warnings clean before coming here for help. Doing that will ensure that we don't waste our time tracking down silly little bugs that Perl could have found for you.

    kindly give your valueable suggestions.

    The impression that I'm getting is that you don't think our help is very valuable at all. You certainly don't seem to take much notice of it.

    --

    See the Copyright notice on my home node.

    Perl training courses

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: calling problem in script
by kennethk (Abbot) on Jun 30, 2009 at 15:28 UTC
    No, your problem is not different. warnings tells you exactly what I said in 776045 and what Corion implied in 776043. This error will prevent your code from executing properly. strict would have kept you from creating the bug in the first place.

    First off, when you post code here, you should make sure that what you post is complete and executable to the extent possible - see How (Not) To Ask A Question. In this case, you omitted including (I assume) use Getopt::Long at the top of your file and have not included your usage_help() subroutine (which you misspell on line 13, caught by strictures). Ignoring that, running with warnings alone yields:

    Name "main::Diagnostics" used only once: possible typo at fluff.pl lin +e 7. Name "main::All" used only once: possible typo at fluff.pl line 9. Name "main::prefix" used only once: possible typo at fluff.pl line 20. Name "main::result" used only once: possible typo at fluff.pl line 4.

    Note the message about line 20, where you create your typeglob with an uninitialized variable. This is (part-of) your bug. This has already been pointed out multiple times.