Ok, this seems to have been caused by some interaction via sub AUTOLOAD in a module of mine which was subclassing P::RD. Hmm. It's really tricky tracing warnings sometimes!
Thanks very much for the help, R. On Wed, 29 Jan 2003, Orton, Yves wrote: > > Does anyone have any idea why this works perfectly: > > while(<FIN>) { > > print $parser->record($_); > > } > > > > but the following fails to parse exactly the same input: > > > > while(my $rec = <FIN>) { > > print $parser->record($rec); > > } > > I dont think its relevent in this situation but the above two whiles arent > equivelent you know. > > while(defined(my $rec = <FIN>)) { > > is equivelent to > > while(<FIN>) { > > > The latter throws the following warnings: > > Use of uninitialized value in index at > > /usr/local/lib/perl5/site_perl/5.8.0/Parse/RecDescent.pm line > > 2979, <GEN0> line 67. > > Use of uninitialized value in index at > > /usr/local/lib/perl5/site_perl/5.8.0/Parse/RecDescent.pm line > > 2979, <GEN0> line 67. > > Use of uninitialized value in length at > > /usr/local/lib/perl5/site_perl/5.8.0/Parse/RecDescent.pm line > > 2734, <GEN0> line 67. > > Use of uninitialized value in substitution (s///) at (eval > > 80) line 2207, <GEN0> line 67. > > Use of uninitialized value in substitution (s///) at (eval > > 80) line 2207, <GEN0> line 67. > > > > This would perhaps suggest that the input is different but > > it's definitely not. > > Er, since you didn't give us any sample data its a bit hard to tell if this > is true. Sorry to doubt you but.... > > For instance it might be interesting to see the output of Devel::Peek on the > two values. > > Ive played with some of my P::RD's under these two constructs and I see no > difference at least in 5.6.1. (Dont have 5.8 to check against right now) > > > The same warnings are thrown if I read the same input > > data from a > > socket-server source. > > Based on my experience with 5.6.1 and 5.8 I would think that this has to do > with 5.8 new IO layers. Try changing it to use the perlio layers directly. I > believe that you can do this easiest by setting the enviornment variable > > PERLIO=perlio > > BTW, if this doesnt help then can you try to replicate this under 5.6.1 and > if there is no error then report it along with as minimal a piece of code > that you can that replicates the problem to > > [EMAIL PROTECTED] > > It might be worth trawling the p5p archives and the bug reporting system to > see if this is in fact a 5.8 error that has already been resolved/worked > around etc. > > A last thought is that it could have to do with what OS you are on. I know > that red hat has problems sometimes due to UTF8 setting (this is wild > guess). seeing the output of perl -V would be useful. > > Anyway, I hope some of this turns out to be useful, let me know how it > turned out, > Cheers, > yves > > > -- +---------------------------------------------------------------+ Roger Michael Pettett Email: [EMAIL PROTECTED] Project Leader (Web Systems), Web: http://www.sanger.ac.uk/ The Sanger Institute http://www.yourgenome.org/ Wellcome Trust Genome Campus http://www.ensembl.org/ Hinxton Cambridge CB10 1SA +---------------------------------------------------------------+