in reply to While Loop in Before Modifier Gives Error
sub _wafer_parse { my $self = shift; open my $FILE, "<", $self->{file}; local *_; while ( <$FILE> ) { ... } }
Better yet, don't assign to global variables.
sub _wafer_parse { my $self = shift; open my $FILE, "<", $self->{file}; while ( my $line = <$FILE> ) { ... } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: While Loop in Before Modifier Gives Error
by ~~David~~ (Hermit) on Jun 24, 2009 at 21:33 UTC |