Re: [Rd] Rd2dvi (PR#9812)

From: Bill Dunlap <>
Date: Thu, 26 Jul 2007 12:09:24 -0700 (PDT)

On Thu, 26 Jul 2007 wrote:

> Is this a bug--
> -------------------------------------------------------------------------------
> <234>% R CMD Rd2dvi base.Rd
> Converting Rd files to LaTeX ...
> base.Rd
> Can't use an undefined value as filehandle reference at
> /opt/R-2.5.1/lib/R/share/perl/R/ line 78.

This may be due to a change I suggested a while back which required perl 5.6 (or so) to work. The change was to ensure that the file handle rdfile was closed when Rdconv was done with it. If this is the problem, upgrading perl to 5.8 will make it go away. should have a 'use v5.6' (or 5.8?) line at the top if it wants to continue to use this syntax.

< open(rdfile, "<$Rdname") or die "Rdconv(): Couldn't open '$Rdfile': $!\n"; <


> open(my $rdfile, "<$Rdname") or die "Rdconv(): Couldn't open '$Rdfile': $!\n";
> # Before we added the 'my $' in front of rdfile,
> # rdfile was not getting closed. Now it will close
> # when $rdfile goes out of scope. (We could have added
> # a close rdfile at the end of the while(<rdfile>), but
> # scoping method is more reliable.
123c127 < while(<rdfile>){ ---
> while(<$rdfile>){
---------------------------------------------------------------------------- Bill Dunlap Insightful Corporation bill at insightful dot com 360-428-8146 "All statements in this message represent the opinions of the author and do not necessarily reflect Insightful Corporation policy or position." ______________________________________________ mailing list
Received on Thu 26 Jul 2007 - 19:18:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 Jul 2007 - 19:36:50 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.