develooper Front page | perl.beginners | Postings from March 2002

RE: calling /path/to/dir from variable

From:
Timothy Johnson
Date:
March 21, 2002 18:39
Subject:
RE: calling /path/to/dir from variable
Message ID:
C0FD5BECE2F0C84EAA97D7300A500D5002581166@SMILEY

Have you tried printing ">/path/to/$line/dir/thefile" to the screen to make
sure it's printing what you expect?

-----Original Message-----
From: GREGOR [mailto:gregor@mail.uajy.ac.id]
Sent: Thursday, March 21, 2002 6: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
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.



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