RE: printing output to a file

2002-09-09 Thread Nandita Mullapudi
Thanks ALL for the quick help! i realised my mistake, "open" shd be outside the loop.. :) :) (scripts that work, very pleasing!) nandita -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: printing output to a file

2002-09-09 Thread david
James Edward Gray II wrote: >> open (OUT, '>outputfile.txt') or die "couldn't"; >> print OUT "$key\n\n", $alignments{$key}, >> "\nXXX\n" the reason is in these 2 lines(especially the open() thingy). whenever you ask Perl to open something for writing, Perl turncate t

Re: printing output to a file

2002-09-09 Thread James Edward Gray II
You're real close to what you need here. You're just reopening (and clearing) that file every time through the for loop. Move that open statement to above the loop and everything will start working fine. Good luck. James On Monday, September 9, 2002, at 11:49 AM, Nandita Mullapudi wrote:

RE: printing output to a file

2002-09-09 Thread Timothy Johnson
09, 2002 9:49 AM To: [EMAIL PROTECTED] Subject: printing output to a file hello list i am trying to print the output of a parsing script to a file- the way it is right now, the print commands are within a foreach loop, and it prints to the screen. in order to get the entire output into a file, i

RE: printing output to a file

2002-09-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Mullapudi [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 09:49 To: [EMAIL PROTECTED] Subject: printing output to a file hello list i am trying to print the output of a parsing script to a file- the way it is right now, the print commands are within a foreach loop, and it prints to the s

printing output to a file

2002-09-09 Thread Nandita Mullapudi
hello list i am trying to print the output of a parsing script to a file- the way it is right now, the print commands are within a foreach loop, and it prints to the screen. in order to get the entire output into a file, i'm using a simple set of commands like so: foreach my $key (keys %a