If what you are trying to do is set the default device or directory for your Perl script, this won't do it.
The "SET DEFAULT" will only be effective for commands in the DCL script you are executing through your pipe. To change the default directory for your Perl script, use the Perl builtin function chdir(). Jordan Henderson Policy prohibits the inclusion of contact information in email signature blocks. Please request contact information via return email if you require it. If we're not supposed to eat animals, then why are they made out of meat? -Anonymous > -----Original Message----- > From: Sandy Fleming [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 03, 2002 1:21 PM > To: [EMAIL PROTECTED] > Subject: Set Default not Working > > > Folks, > > I'm new to using Perl in VMS, not quite so new to Perl itself. > > I've been using the following as given by David Lyon in the > Perl FAQ at > http://www.sidhe.org/vmsperl/vmsperlfaq.html#Q12 > > open(OUT,"|\@sys\$input"); # mind the backslash in sys$input > print OUT "show default\n"; # or any other command > print OUT "dir/date"; # or any other command > close(OUT); > > It works bery nicely with these commands, but I can't get it > to work with > SET DEFAULT at all: > > open(OUT,"|\@sys\$input"); > print OUT "set default $x\n"; > close(OUT); > > Where the variable $x holds the directory path as a string. > This gives no > errors, it just doesn't change the directory default. > > The following works fine for displaying the directory even > with exactly the > same string in $x: > > open(OUT,"|\@sys\$input"); > print OUT "directory $x\n"; > close(OUT); > > Does anyone know why the SET DEFAULT command doesn't work here? > > Sandy Fleming > http://scotstext.org/ > > > >
