Sorry about the last message, I hit the reply too soon.

Anyway, thanks for the answer.  It _almost_ works.  Try the following
script:

  use VMS::Stdio "getname";
  open IN, "<mpa0:" || die $^E;
  print getname(*IN), "\n";
  system ("show device /full mpa");
  sleep (5);

I get the result "MPA0:[].;".  Yet, as the "show device" command
displays, my real device is something like MPA8: or MPA30:.

Sigh.  I'll just have to put the perl in a DCL wrapper.

-- Pat

Dan Sugalski wrote:
> 
> At 12:21 PM 8/13/2001 -0500, Patrick Spinler wrote:
> >So, if I want to accomplish the same thing in perl, I need to discover
> >the actual file name associated with an open filehandle.  Is this
> >possible ?  Is there some obvious cluetrain in the documentation I
> >miraculously missed being flattened by ?
> 
> Not generally available in perl, but lucky you, we can do it on VMS! :)
> 
> Check out VMS::Stdio, specifically the getname function.
> 
>                                         Dan
> 
> --------------------------------------"it's like this"-------------------
> Dan Sugalski                          even samurai
> [EMAIL PROTECTED]                         have teddy bears and even
>                                       teddy bears get drunk

-- 
      This message does not represent the policies or positions
             of the Mayo Foundation or its subsidiaries.
  Patrick Spinler                       email:  [EMAIL PROTECTED]
  Mayo Foundation                       phone:  507/284-9485

Reply via email to