in reply to Re: Moose reading file line by line
in thread Moose reading big file line by line
I also was trying to do it this way:
has 'handler' => ( isa => 'FileHandle', is => 'rw' ); sub openHandler { my $self = shift; open( $self->handler, '<', $self->file ) or croak "Can't open file +"; } sub closeHandler { my $self = shift; close $self->handler; } sub readLine { my $self = shift; return <$self->handler>; }
but im getting Bareword syntax error
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Moose reading file line by line
by Corion (Patriarch) on Apr 27, 2015 at 13:08 UTC | |
by learning.moose (Novice) on Apr 27, 2015 at 13:37 UTC | |
by Corion (Patriarch) on Apr 27, 2015 at 13:45 UTC |