Perl - run sub routine for list of devices

Hi,

Can anyone please correct the script such that it run on all the devices in the devicelist.txt file.

The problem is when the script runs it only reads the first device in the list, configures the device and exists.

Script:

The devicelist.txt:
device.crs
device2.ptd
device3.xyz

Change the line in to the script and try. It will process the each devices in the devicelist.txt

$host=shift @list;

to

$host=$_;