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",
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
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
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",
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) ||