in reply to Re^5: scandns.pl
in thread scandns.pl

Please read my original reply again. My suggested fix was not to replace
($x==4)
with
($x==0)

but to replace
my $x;
with
my $x=0;

All I can say is, if this is the accuracy with which you approach programming, I would never hire you.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Replies are listed 'Best First'.
Re^7: scandns.pl
by taint (Chaplain) on Nov 15, 2013 at 02:32 UTC
    In all fairness to both of us;

    Your last statement:

    Please read my original reply again. My suggested fix was not to repla +ce ($x==4) with ($x==0) but to replace my $x; with my $x=0;

    I think if you carefully go back over all this, you'll see neither of us suggested:

    ($x==4) with ($x==0)

    I'm going to take this opportunity to suggest that we'd both do well to drop this.

    It's all beginning to seem pretty silly. Don't you think? :)

    Best wishes, jdporter.

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

      Whatever; s/($x==0)/($x=0)/; Either way, you completely misunderstood what I was suggesting. Did you start over with my fix as suggested?

      But you're right, this is silly, mainly because the OP's code is pile of crap which no good programmer would write, so it hardly seems worthwhile to go to any trouble to eliminate an 'undefined' warning it produces.

        Greetings again. :)

        In answer to your question; yes. I did. But without success.

        Frankly. I find this whole thing quite an enticing puzzle.
        OH. Indeed. It really is a POS (excuse my language). But here we are, you insist that my logic is flawed, and you explain why. I attempt your solution, and find it doesn't work.
        I examine the code, and come to a different solution, and explain why. I try it, and it works.

        Don't you find this a bit of an intriguing puzzle?

        Sure. The code seems hardly worth it. But just from a purely analytical perspective. I think it's interesting. I'd love to find a conclusive resolution.

        Best wishes.

        --Chris

        #!/usr/bin/perl -Tw
        use Perl::Always or die;
        my $perl_version = (5.12.5);
        print $perl_version;