Bryan Harris wrote:
Hi,
I'm not sure I understand why this is happening. Maybe someone can
explain it to me. No matter how many times I use the chomp() function
on my array, when I print the array it always prints the newlines.
But I have another array, which will print without the newlines.
In the first block of code it always prints the newlines even if I use
chomp. In the second block of code it won't print the newlines. What
am I doing wrong?
@file_list = `find /home/ -type d -maxdepth 1`;
chomp ( @file_list );
chomp ( @file_list );
chomp ( @file_list );
print @file_list;
@wombat_config = (
"workers 1 #The maximum number of simultaneous backups\n",
"pruners 1 #The maximum number of simultaneous pruners\n",
"maxconnect 1 #The maximum number of simultaneous conenctions to a
single host\n",
"rcmd ssh #The command to use to connect to backup targets\n"
);
chomp ( @wombat_config );
print @wombat_config;
What OS?
What OS did the file came from?
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/