Re: Question about writing to file

2002-03-28 Thread John W. Krahn
Richard Noel Fell wrote: > > Here is a subroutine that prints strings to a file. I want the routine > to write strings to the file in the format > Question1:factor(x^2+4*x+3)=(x+3)*(x+1). > However, what is written to file is > Question1:factor(x^2+4*x+3) > =(x+3)*(x+1), that is, > a newline befo

Re: Question about writing to file

2002-03-28 Thread Hans Holtan
Try removing the newline at the end of your question with a call to chomp. else{ for (my $i=1; $i<=$#qk+1;$i++){ chomp ($Question_hash{$qk[$i-1]}); print In1 "Question"."$i".":factor$Question_hash{$qk[$i-1]}=$Answer_hash{$ak[$i-1]}\n"; } >Here is a subroutine that prints strings to a file.

RE: Question about writing to file

2002-03-28 Thread Wagner-David
]] Sent: Thursday, March 28, 2002 11:26 To: [EMAIL PROTECTED] Subject: Question about writing to file Here is a subroutine that prints strings to a file. I want the routine to write strings to the file in the format Question1:factor(x^2+4*x+3)=(x+3)*(x+1). However, what is written to file is Question1

Question about writing to file

2002-03-28 Thread richard noel fell
Here is a subroutine that prints strings to a file. I want the routine to write strings to the file in the format Question1:factor(x^2+4*x+3)=(x+3)*(x+1). However, what is written to file is Question1:factor(x^2+4*x+3) =(x+3)*(x+1), that is, a newline before the = sign. Is there some way of inhib