[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] [Macperl] Write to file HELP!!!



Alex,alsteff@econ.moldnet.md,Net ˇcrivait:
9MonacoI have a sample program:
$name='Alex';
print "Input: ";
$you=<STDIN>;
$file='> test.txt';
open ">> test.txt";
format STDOUT=
@<<< @<<<<<<<<<<
$name, $you
.
write();
close(0);

How to write into the file 'test.txt' My message discribed in format?
Thanks.
10
This version works as "advertized" on my machine.
#! perl -w
$name='Alex';
print "Input: ";
$you=<STDIN>;
$file='test.txt';
open (OUTFILE, ">> $file");
format OUTFILE=
@<<< @<<<<<<<<<<
$name, $you
.

write (OUTFILE);
close(OUTFILE);


Fran¨ois Granger, Perl Begginner
(if there is no letter between the "n" and the "o", some 7 bit ASCII filter removed it along the way ;-)


***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch