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) || die $1;

my @articleArray = <readFile>;

while(<@articleArray>)
{
print $_;
}







_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to