in reply to print list to socket
Do you want a single string that you can print to your socket? You could get that this way:
chomp @FILE; my $every_command = join '', map { "$_\r\n" } @FILE; print $sock $every_command;
If you want a list of strings, you could do that this way:
chomp @FILE; foreach my $command ( @FILE ) { print $sock "$command\r\n"; }
It might also hep you to look in perlvar at $/, also known as $INPUT_RECORD_SEPARATOR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print list to socket
by yesterday (Novice) on Jun 05, 2007 at 12:38 UTC |