Re: Problems with while loop and array

2003-03-17 Thread Brett W. McCoy
Erwin Zavala wrote: I know I could use the filehandle but I am trying to understand why I cannot use the array and print each element at the time. #!/usr/bin/perl use strict; use Fcntl; $/ = "\n\n"; sysopen(readFile, "cnnArticle.txt", O_RDONLY) || die $!; sysopen(writeFile, "fortuneCookie.txt",

Re: Problems with while loop and array

2003-03-17 Thread Scott R. Godin
Erwin Zavala wrote: > I know I could use the filehandle but I am trying to understand why I > cannot use the array and print each element at the time. > > #!/usr/bin/perl use warnings; #why was this left out? > use strict; > use Fcntl; > > $/ = "\n\n"; # I assume you know what you're doing her

Re: Problems with while loop and array

2003-03-16 Thread Rob Dixon
Erwin Zavala wrote: > I know I could use the filehandle but I am trying to understand why I > cannot use the array and print each element at the time. > > #!/usr/bin/perl > use strict; > use Fcntl; > > $/ = "\n\n"; > sysopen(readFile, "cnnArticle.txt", O_RDONLY) || die $!; > sysopen(writeFile, "for

Re: Problems with while loop and array

2003-03-16 Thread Wiggins d'Anconia
Erwin Zavala wrote: I know I could use the filehandle but I am trying to understand why I cannot use the array and print each element at the time. #!/usr/bin/perl use strict; use Fcntl; $/ = "\n\n"; sysopen(readFile, "cnnArticle.txt", O_RDONLY) || die $!; sysopen(writeFile, "fortuneCookie.txt",

Problems with while loop and array

2003-03-16 Thread Erwin Zavala
I know I could use the filehandle but I am trying to understand why I cannot use the array and print each element at the time. #!/usr/bin/perl use strict; use Fcntl; $/ = "\n\n"; sysopen(readFile, "cnnArticle.txt", O_RDONLY) || die $!; sysopen(writeFile, "fortuneCookie.txt", O_WRONLY|O_CREAT) ||