Re: Lines written to a file are not contiguous

2013-05-10 Thread Sherman Willden
Thank you all. I am not sure what $write and $read are for since I am just now getting back to this. They may have been something I used then discarded. I am surprised that I didn't get a notice that they are only used once. Sherman On Fri, May 10, 2013 at 8:20 AM, Dr.Ruud wrote: > On 07/05/20

Re: Lines written to a file are not contiguous

2013-05-10 Thread Dr.Ruud
On 07/05/2013 20:00, Sherman Willden wrote: foreach my $file ( @docfiles ) { my ( $write, $read ); What were they meant for? -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Lines written to a file are not contiguous

2013-05-09 Thread David Christensen
On 05/09/13 07:56, Sherman Willden wrote: Thank you, David. I thought about doing cat but I thought it would have to be a system call. YW. TIMTOWTDI -- system calls or otherwise. More importantly, there is more than one style of Perl programming. I find Perl especially useful for "quick an

Re: Lines written to a file are not contiguous

2013-05-09 Thread David Christensen
Shlomi Fish wrote: Furthermore, many non-UNIX-like systems don't contain a cat command. I wrote: Thank God for electronics recycling. ;-) On 05/08/13 23:50, Shlomi Fish wrote: What do you mean? I meant that systems that are non-UNIX-like (or cannot be made Unix-like with Linux, *BSD, e

Re: Lines written to a file are not contiguous

2013-05-09 Thread Sherman Willden
Thank you, David. I thought about doing cat but I thought it would have to be a system call. Sherman On Tue, May 7, 2013 at 9:26 PM, David Christensen wrote: > On 05/07/13 11:00, Sherman Willden wrote: > >> ... I downloaded the >> >> Oreilly Programming Perl Version 4 examples. There are 30 di

Re: Lines written to a file are not contiguous

2013-05-08 Thread Shlomi Fish
Hi David, On Wed, 08 May 2013 19:37:30 -0700 David Christensen wrote: > I wrote: > >> $| = 1; # [1] $OUTPUT_AUTOFLUSH > > On 05/08/13 02:24, Shlomi Fish wrote: > > http://perl-begin.org/tutorials/bad-elements/#properly_autoflushing > > Which recommends: > > use

Re: Lines written to a file are not contiguous

2013-05-08 Thread Rob Dixon
On 08/05/2013 14:16, Shlomi Fish wrote: See: http://perl-begin.org/tutorials/bad-elements/ Regards, Shlomi Fish It would make me feel a lot better if you would declare your interest in your own web site when you link to it. It's hardly an endorsement if you link to something else yo

Re: Lines written to a file are not contiguous

2013-05-08 Thread David Christensen
I wrote: >>$| = 1; # [1] $OUTPUT_AUTOFLUSH On 05/08/13 02:24, Shlomi Fish wrote: http://perl-begin.org/tutorials/bad-elements/#properly_autoflushing Which recommends: use IO::Handle; STDOUT->autoflush(1); 1. For larger, longer-lived, shared, portable,

Re: Lines written to a file are not contiguous

2013-05-08 Thread Shlomi Fish
Hello, Rob, On Wed, 08 May 2013 13:56:26 +0100 Rob Dixon wrote: > On 08/05/2013 10:24, Shlomi Fish wrote: > > > > This is better: > > > > http://perl-begin.org/tutorials/bad-elements/#properly_autoflushing > > > >>print `cat * >>foo.out`;# [2] qx// > > > > This is the same as «system

Re: Lines written to a file are not contiguous

2013-05-08 Thread Rob Dixon
On 08/05/2013 10:24, Shlomi Fish wrote: This is better: http://perl-begin.org/tutorials/bad-elements/#properly_autoflushing print `cat * >>foo.out`; # [2] qx// This is the same as «system('cat * >> foo.out')» (only more costly), and the command in this case should not emit any outp

Re: Lines written to a file are not contiguous

2013-05-08 Thread Shlomi Fish
Hello David. On Tue, 07 May 2013 20:26:23 -0700 David Christensen wrote: > On 05/07/13 11:00, Sherman Willden wrote: > > ... I downloaded the > > Oreilly Programming Perl Version 4 examples. There are 30 directories > > with 2211 files. I want each chapter to have a consolidated file with > > a

Re: Lines written to a file are not contiguous

2013-05-07 Thread David Christensen
On 05/07/13 11:00, Sherman Willden wrote: ... I downloaded the Oreilly Programming Perl Version 4 examples. There are 30 directories with 2211 files. I want each chapter to have a consolidated file with all the examples for that chapter. I created the consolidate_examples.pl script which goes in

Re: Lines written to a file are not contiguous

2013-05-07 Thread Sherman Willden
Thank you all. It will take a day or two to get through all of this Sherman On Tue, May 7, 2013 at 1:52 PM, Jim Gibson wrote: > > On May 7, 2013, at 11:00 AM, Sherman Willden wrote: > > > Lines written to a file are not contiguous. > > > > First I will describe what I want the script to perfor

Re: Lines written to a file are not contiguous

2013-05-07 Thread Jim Gibson
On May 7, 2013, at 11:00 AM, Sherman Willden wrote: > Lines written to a file are not contiguous. > > First I will describe what I want the script to perform and then I will > include the script at the end of this message. I downloaded the Oreilly > Programming Perl Version 4 examples. There a

Re: Lines written to a file are not contiguous

2013-05-07 Thread Brandon McCaig
On Tue, May 07, 2013 at 12:00:10PM -0600, Sherman Willden wrote: > Lines written to a file are not contiguous. OK. Let's take a look then... (Note that your mail client seems tos have wrapped the code... I'm going to fix that in my quotes so it's readable) > #!/usr/bin/perl > > use v5.16.3; > #