use myRecord; open FILE, $file or carp "Couldn't open file $file: $!"; while (my $record = new myRecord(\*FILE)) {