Hi, Anish,

open INPUT, "a.txt" or die;
# binmode INPUT; # if it's a binary file.
$data = join "", <INPUT>;
close INPUT;



在 2005-02-11 11:40:00 您写道:
>Hi
>
>I wanted to read the content of file in one varaible. Now I am doing
>
>open INPUT, "a.txt" | die "Cannot open the file";
>
>while (<INPUT>)
>{
>   $temp=$temp.$_;
>}
>
>print "the entire file is $temp";
>close(INPUT);
>
>I wanted to get the entire varaible I tried with other way but failed
>
>Anish

                    致
礼!

            Xiaofang Zhou
            [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to