develooper Front page | perl.vmsperl | Postings from January 2002

Confused about open/append failure

Thread Next
From:
Alan Winston - SSRL Central Computing
Date:
January 31, 2002 21:08
Subject:
Confused about open/append failure
Message ID:
01KDQGYESOZY9FNXA4@SSRL.SLAC.STANFORD.EDU
VMS Perl people --

I can open a file for append from DCL but can't open it from Perl.  
I'd like to know both "how come" and how I can get a more useful status from
Perl about why.  No doubt this is a baby question, but it seems like a
VMS-related one. 

From DCL:

$ open/append LOG $9$dka0:[reqs_log]reqs.log
$ write LOG "--------------------------------------------------------------"
$ write LOG "test"
$ write LOG "test"
$ write LOG "test"
$ write LOG "--------------------------------------------------------------"
$ close LOG
$

reqs.log is a Fortran carriage-control file, so this types out as 
-----------------------------------------------------------------
est
est
est
------------------------------------------------------------------


Then

$ perl
open LOG, ">> $9$dka0:[reqs_log]reqs.log" or die "couldn't open it";
^Z
couldn't open it at - line 1.
%RMS-F-SYN, file specification syntax error

$ perl
open LOG, "+>> $9$dka0:[reqs_log]reqs.log" or die "couldn't open it";
 Exit
couldn't open it at - line 1.
%RMS-F-SYN, file specification syntax error
$

Thanks for any insight.

-- Alan


===============================================================================
 Alan Winston --- WINSTON@SSRL.SLAC.STANFORD.EDU
 Disclaimer: I speak only for myself, not SLAC or SSRL   Phone:  650/926-3056
 Paper mail to: SSRL -- SLAC BIN 99, 2575 Sand Hill Rd, Menlo Park CA   94025
===============================================================================


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About