in reply to Re: Ping not working
in thread Ping not working

If i run the code you posted with my $ip = qq(66.39.54.27);

Because there's only one item in the qw// list, that does not make a difference in this case; the list will return its last item.

use Data::Dumper; my $ip1 = qw(172.16.1.2); my $ip2 = qq(172.16.1.2); my $ip3 = qw(172.16.1.2 172.16.1.3); my $ip4 = qq(172.16.1.2 172.16.1.3); print Dumper($ip1, $ip2, $ip3, $ip4); __END__ $VAR1 = '172.16.1.2'; $VAR2 = '172.16.1.2'; Useless use of a constant ("172.16.1.2") in void context at - line 4. $VAR3 = '172.16.1.3'; $VAR4 = '172.16.1.2 172.16.1.3';

(toolic already pointed this out a little while ago.)

Replies are listed 'Best First'.
Re^3: Ping not working
by karlgoethebier (Abbot) on Mar 11, 2015 at 18:24 UTC
    "...toolic already pointed this out a little while ago."

    No. He wrote that he isn't sure. But perhaps i posted to fast, may be :-(

    But i'll take a look at what i did...

    Update: I tried the qq as well as the qw version on my Mac and it seems that both ping. I remember that i tried the same stuff on XP at noon but the qw version didn't work. But may be i miss something. Unfortunately i can't reproduce this on XP tonight. But i'll be back.

    And please note, when i concede a possible fault i did (because of answering to fast for some reason or what ever) i consider even one down vote as extremely impolite.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

      Because there's only one item in the qw// list, that does not make a difference in this case ... toolic already pointed this out a little while ago.

      No. He wrote that he isn't sure.

      Yes, toolic did: "qw vs. qq will make no difference in this case". The "I'm not sure" refers to why you suggested it, because it makes no difference in this case.