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

Re: Confused about open/append failure

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
February 1, 2002 00:30
Subject:
Re: Confused about open/append failure
Message ID:
Pine.LNX.4.21.0202010015500.24061-100000@redcap.sidhe.org
On Thu, 31 Jan 2002, Alan Winston - SSRL Central Computing wrote:

> 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. 
> 
> 
> $ perl
> open LOG, ">> $9$dka0:[reqs_log]reqs.log" or die "couldn't open it";

Perl, does scalar and array variable interpolation inside of double-quoted
strings. The $9 and $dka are getting replaced before the file's
opened. Either single-quote the filename, or backwhack the dollar signs.
	
						Dan


Thread Previous | 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