noshankus
06-03-2003, 05:39 AM
Hi,
I have some code, and I can't figure out why the hell it won't work.
open (LIST, "$list");
my @list=<LIST>;
open (TEMP, ">$temp");
foreach $line(@list) {
open(USER, "/home/data/intranet/testies/$build/users/$line/current.usr");
my @user=<USER>;
close(USER);
print TEMP "$line";
print TEMP "$build";
print TEMP "@user";
}
close(TEMP);
close(LIST);
The $var's are declared correctly, and using this, I actually get an output of every user's name and the build number (cos of $line and $build) - but I don't get the @user array in the TEMP file.
Each file is chmod 777, so it's not a rights issue.
Any help is very much appreciated.
Best regards,
I have some code, and I can't figure out why the hell it won't work.
open (LIST, "$list");
my @list=<LIST>;
open (TEMP, ">$temp");
foreach $line(@list) {
open(USER, "/home/data/intranet/testies/$build/users/$line/current.usr");
my @user=<USER>;
close(USER);
print TEMP "$line";
print TEMP "$build";
print TEMP "@user";
}
close(TEMP);
close(LIST);
The $var's are declared correctly, and using this, I actually get an output of every user's name and the build number (cos of $line and $build) - but I don't get the @user array in the TEMP file.
Each file is chmod 777, so it's not a rights issue.
Any help is very much appreciated.
Best regards,