Hi
limekiller,
You need to look at
GetOpt::Long which comes with the standard perl distribution I think.
It does what you want - handling multiple value command line options with long names. You might want to look at the other assortment of GetOpt::* modules that there are too.
Update: You might not want to have all three ip adresses under the same commandline-option name, since you are scp-ing to 2 computers and then connecting to the third the GetOpt::*, might not put them in the correct order - but even if it it does, your users might not, you can cut down errors if you have 2 or 3 option names, like:
checkfilter.pl -machine1 '192.168.0.1' -machine2 '192.168.0.2' -machi
+ne3 '192.168.0.3'
# or
checkfilter.pl -mtr '192.168.0.1' -mtr '192.168.0.2' -nmap '192.168.0
+.3'
With the second example, you could loop through the -mtr switches, mtr and scp to it, then ssh and nmap to -nmap. This would mean you could add as many "-mtr"s as you want. Does this make sense - I know only a little about mtr and nmap?
$code or die
Using perl at
The Spiders Web