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

creating file name from array

Thread Next
From:
GREGOR
Date:
March 20, 2002 21:53
Subject:
creating file name from array
Message ID:
20020321055546.28409.qmail@mail.uajy.ac.id
hi guys,

I'm very new to perl. 

Ok, let's assume that I have a file named *user.txt* contained with my user 
name : 

donna
maria
karina
..
..
..
etc 

I want to make a file for each of them. The file name and the content should 
contained with their names, eg. .qmail-donna, .qmail-maria and 
..qmail-karina. 

so far, here's my code : (which isn't working) 

#!/usr/bin/perl 

$file="user.txt";
open FILE,$file;
@user=<FILE>;
close FILE; 

foreach $lines (@user){
    system "echo |/usr/local/blah ./$lines/maildir/filter > .qmail-$lines";
} 

please help me to make the right code. 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

Thread Next


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