Perl script to run commands on network devices