You've got 2 of things to tweak
1. It's @ARGV so you want $ARGV[1]
2. I assume you want the first item from @ARGV which is $ARGV[0]
You also can just say $_ you don't need ${_}
But the best advice I can give you is, not to reinvent the wheel. Use nmap. Nmap does portscans and a heck of lot more. It can give a rough security profile of your system including a fingerprint if possible
| Mynd you, mønk bites Kan be pretti nasti... |
In reply to Re: Port Scan
by grep
in thread Port Scan
by cored
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |