in reply to net telnet help

Close, but I think this is what you want:

#!/usr/bin/perl -w use strict; use Net::Telnet; open (INPUT, 'disks') or die $!; my @disks = <INPUT>; close (INPUT); my $conn = new Net::Telnet(Timeout => 2810, Prompt => '/%/', Host => 'hostname' ); $conn->login( "username", "password" ); foreach my $disk ( @disks ) { chomp($disk); $conn->cmd( "run command here $disk" ); }

Replies are listed 'Best First'.
Re^2: net telnet help
by ikegami (Patriarch) on Dec 15, 2004 at 23:48 UTC
    Don't forget to chomp(@disks).