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

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;

Replies are listed 'Best First'.
Re^8: scandns.pl
by jdporter (Paladin) on Nov 15, 2013 at 02:43 UTC

    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;

        I don't find it all that intriguing. I made exactly one change to the OP's code — s/my $x;/my $x=0;/ — and the warning went away.

        You say you got different results, but I have zero confidence that you haven't mucked with the code in other ways, so I'm not inclined to think that my fix doesn't and wouldn't work for you.

        Maybe you should post your version of the code so I can try it.