in reply to declaring an array within a package
Is not valid Perl.$self->@File = <FILE>;
I think you want
You can then read the array out using:$self->{file} = [ <FILE> ];
By the way, I also think you are confusing packages, which double in Perl as namespaces and classnames, with object data.foreach my $line (@{ $self->{file} }) { print $line; }
You may find the following perl documents handy:
perltoot, perlobj, perltut perlreftut, perlref and perl. Use perldoc documentname to view them on your system.
You might also want to split your code into smaller files :-)
Joost.
update: I meant perlreftut
|
|---|