MinniePerl
Technical User
#open (FIVEWORDS, ">>a:\\test.txt"; doesn't append any data to a:\test.txt
#and I can't figure out what the problem is. Any suggestions? Thanks much.
while ($quit ne "q"
{
print "Enter any word and return: "; #user input
chomp ($word1=<STDIN>); #Assign input
print "Enter another word and return: "; #user input
chomp ($word2=<STDIN>); #assign input
print "Enter another word and return: "; #user input
chomp ($word3=<STDIN>); #assign input
print "Enter another word and return: "; #user input
chomp ($word4=<STDIN>); #assign input
print "Enter the fifth and final word of this group and return: ";
#user input
chomp ($word5=<STDIN>); #assign input
@words=join(", ",( "$word1", "$word2", "$word3", "$word4", "$word5");
open(FIVEWORDS, ">>a:\\test.txt"
@words=<FIVEWORDS>;
$_="@words";
close(FIVEWORDS);
print$_;
print "Enter q to quit or press return to enter another group
of five words: "; #quit or continue
chomp ($quit=<STDIN>);
<STDIN>
}
#and I can't figure out what the problem is. Any suggestions? Thanks much.
while ($quit ne "q"
{
print "Enter any word and return: "; #user input
chomp ($word1=<STDIN>); #Assign input
print "Enter another word and return: "; #user input
chomp ($word2=<STDIN>); #assign input
print "Enter another word and return: "; #user input
chomp ($word3=<STDIN>); #assign input
print "Enter another word and return: "; #user input
chomp ($word4=<STDIN>); #assign input
print "Enter the fifth and final word of this group and return: ";
#user input
chomp ($word5=<STDIN>); #assign input
@words=join(", ",( "$word1", "$word2", "$word3", "$word4", "$word5");
open(FIVEWORDS, ">>a:\\test.txt"
@words=<FIVEWORDS>;
$_="@words";
close(FIVEWORDS);
print$_;
print "Enter q to quit or press return to enter another group
of five words: "; #quit or continue
chomp ($quit=<STDIN>);
<STDIN>
}