At 9:02 PM -0700 1/31/02, 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. >$ 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 The excessive number of dollar signs in all things DEC-related does get one in trouble with Perl. You have a double quoted string which will do variable interpolation, so '$9' and '$dka0...' are interpreted as variables. You want to either escape the dollar signs or put the filename into single quotes. These may illustrate how that works: $ perl print "$1$dua99"; ^Z $ perl print "\$1\$dua99"; ^Z $1$dua99 $ perl print '$1$dua99'; ^Z $1$dua99 >$ 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. -- ____________________________________________ Craig A. Berry mailto:craigberry@mac.com "Literary critics usually know what they're talking about. Even if they're wrong." -- Perl creator Larry WallThread Previous | Thread Next