Hi,
I have a file called news.txt and it contains like this:
1. Message 1
2. Message 2
open(F, "news.txt"
;
@news= <F>;
close(F);
I want to assign the whole message to a variable. So I did the following:
foreach $message (@news) {
$news = qq($message);
}
But the variable $news is reading only the first line. But I want to read the whole text and assign them to one
variable which is $news. Any ideas?
-Aaron
I have a file called news.txt and it contains like this:
1. Message 1
2. Message 2
open(F, "news.txt"

@news= <F>;
close(F);
I want to assign the whole message to a variable. So I did the following:
foreach $message (@news) {
$news = qq($message);
}
But the variable $news is reading only the first line. But I want to read the whole text and assign them to one
variable which is $news. Any ideas?
-Aaron