Try
@lines = `/usr/local/bin/ssh -l priss remotehost cat list-txt`; and then skip any blank lines at this end... foreach my $line ( @lines ) { chomp $line; next unless $line; } regards Jeff > -----Original Message----- > From: Priss [mailto:[EMAIL PROTECTED]] > Sent: 06 September 2002 09:51 > To: [EMAIL PROTECTED] > Subject: get a list into array from a remote machine > > > Hiya, > > Wonder if someone can correct me, I am trying to get a > list into an array from a file on a remote machine. > For some reason, it didn't work: > > @array = `/usr/local/bin/ssh -l priss remotehost > "open(FILE,"/home/priss/list-txt"); > @arr1 = <FILE>; > close(FILE); > foreach(@arr1){ > next if /^(\s)*$/; > chomp; > } > "`; > > print "@array\n"; > > perl seems to complain about "In string, @array now > must be written as \@array at..." Why?? > > Many thanks, > > Priss > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]