CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Regular Expressions:
Split the line and save file


New User

Mar 2, 2007, 1:53 AM

Post #1 of 1 (5904 views)
Split the line and save file Can't Post

Hi all,

I write the script for multiple user account deletion initially what iam doing first open the users _delete file and username and save then I have to find out the servers details for usersname grep it and and take the only the server name and save it to systems_list file . but run the systems_list file is not saved .

please give ur valuable suggestions,

$line1= 0;
$MYFILE= "/home/rajrajan/tnp/test.txt";
open(MYFILE) or die("Could not open MYFILE file.");
foreach $line (<MYFILE>)


($name,$fullname,$nid,$tdate,$mgrnid,$mname) =

open(FH1, ">users_delete");
print FH1 "$name Y";

@sline = `grep $name /home/monitor/files/*`;
foreach $sline (@sline)

($dummy,$server) = split /password./,$sline;
($server,$dummy) = split /:/,$server;

open (FH2, ">systems_list");
print FH2 "$server";

close (FH2);
system ("./propagate");


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives