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

Set Default not Working

From:
Sandy Fleming
Date:
September 3, 2002 10:17
Subject:
Set Default not Working
Message ID:
NEBBIMDECLENJCNAKJDBAEOOCHAA.sandy@fleimin.demon.co.uk
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/







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