José nyimi wrote: > > Hello, Hello,
> I would like to check if a given directory is writable for the user who run the >script. > > My first idea is to open a dummy file in ">" mode on that directory and > check if everythink went ok or not. > > Which will look like: > > #!/usr/bin/perl > use strict; > use warnings; > my $mydir=$ENV{MY_DIR}; > > unless(&check_w($mydir)){ > #Continue the job whithout stress ... > print "I do"; > } > > But I'm not satisfied with this solution. > I think there is an other one better designed. > Could I get input from you please ? #!/usr/bin/perl use strict; use warnings; unless ( -w $ENV{MY_DIR} ) { #Continue the job whithout stress ... print "I do"; } perldoc -f -w perldoc -f -W John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]