So what is the error message line #5 is giving?
Given the syntax you are obviously doing this on some flavor of UNIX.
Does the user executing the script have permissions to write to these directories?
Trevor.
-----Original Message-----
From: GREGOR [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 9:36 PM
To: perl-win32
Subject: calling /path/to/dir from variable
hi all,
I've been trying to write a small script to make my job easier. I really
need some inputs here. OK, here's what I want to do :
1.#!/usr/bin/perl -w
2.use strict;
3.my @users = qw/ donna maria karina /;
4.foreach my $line (@user){
5. open TEMP, ">/path/to/$line/dir/thefile" or die "$!";
6. print TEMP "|/usr/local/blah ./$line/maildir/filter";
7. close TEMP or die "$!";}
line no.5 isn't working, although the directory really exist.
are there any other ways to do this?
thank you.
regards,
Gregor
WATCHOUT! 3RD INTERNATIONAL SEMINAR ON SUSTAINABLE ENVIRONTMENTAL
ARCHITECTURE + DIGITAL ARCHITECTURE, 9-10 MARCH 2002, YOGYAKARTA
http://senvar.virtue.nu or http://senvar.uajy.web.id
NATIONAL DESIGN COMPETITION
http://senvar.uajy.web.id/lombadesain
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
