>>>>> "CS" == Curt Shaffer <cshaf...@gmail.com> writes:
CS> #!/usr/bin/perl -w still no warnings and strict. USE THEM. do it now. add them and declare all your variables. it will save your ass. CS> for (1 .. 5){ CS> my $hping = `sudo hping3 www.microsoft.com -S -p 80 -c 1`; CS> push @hping_array,(split'\ ',$hping)[15]; what is the \ doing there. it makes the space into a space. it is not seen by split or the regex engine. CS> } CS> $hping_compare = "$hping_array[0]"; why the quotes? you don't need to quote something if it is a single value CS> foreach (@hping_array){ foreach my $ping ( @hping_array){ use named variables and not $_ whenever you can. it makes for better code and it is easier to follow. there are cases where $_ must be used and some places where it is good but names are better in general CS> On Feb 8, 2010, at 7:19 PM, Uri Guttman wrote: stop quoting entire emails. we have those in our email folders. put your reply BELOW the edited quoted email as needed. if you are just posting new code with no actual reply, then why keep the useless quoted email? uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/