my $curpos = -1; my $curpos1 = -1; my $curpos2 = -1; my $curpos3 = -1; my $cur = -1; open (QUOTAOUT, ">D:\\Home.txt") || die "Can't open output file."; $file = "Home01.txt"; chomp ($file); open (QUOTA1, "D:\\Home01.txt") || die "Can't open file."; while (defined ($file = )) { $quota = ; next if ($quota eq ""); @quota = split(/\t/, $quota); @quota[1] =~ s/^\://; @quota[1] =~ s/^\s+//; next if (@quota[0] eq "Used(%)"); if (@quota[0] eq "Object") { @quota[1] =~ tr/A-Z/a-z/; @uidt = split(/\\/, @quota[1]); chomp (@uid[2]); @uidt[2] =~ s/\W.*//; $curpos = $curpos + 1; $curpos3 = $curpos3 + 1; @uid[$curpos] = @uidt[2]; @path[$curpos3] = @quota[1]; next; } if (@quota[0] eq "Quota") { @quotast = split(/\s/, @quota[1]); chomp (@quotast[0]); @quotast[0] =~ s/\W.*//; $curpos1 = $curpos1 + 1; @quotas[$curpos1] = @quotast[0]; next; } if (@quota[0] eq "Current") { @usaget = split(/\s/, @quota[1]); chomp (@usaget[0]); @usaget[0] =~ s/\W.*//; $curpos2 = $curpos2 + 1; @usage[$curpos2] = @usaget[0]; next; } } close QUOTA1; chomp (@path); foreach $uid(@uid) { $cur = $cur + 1; print QUOTAOUT "Usage for $uid is @usage[$cur] bytes. Quota is @quotas[$cur] bytes. Server is lnxdayhome01. Path is @path[$cur]\n"; #### Begin Input File: Object : T:\HD1\UDENTJP Quota : 250000000 Bytes Current : 0 Bytes Used(%) : 0% Object : T:\HD1\UDEPAML Quota : 250000000 Bytes Current : 336821 Bytes Used(%) : % Object : T:\HD1\UDERRTX Quota : 250000000 Bytes Current : 70095734 Bytes Used(%) : 28% Object : T:\HD1\UDESCJT Quota : 250000000 Bytes Current : 81945 Bytes Used(%) : % Object : T:\HD1\UDETELX Quota : 250000000 Bytes Current : 229442791 Bytes Used(%) : 92% Object : T:\HD1\UDEUTGB Quota : 250000000 Bytes Current : 81945 Bytes Used(%) : % Object : T:\HD1\UDEVIR1 Quota : 250000000 Bytes Current : 0 Bytes Used(%) : 0% Object : T:\HD1\UDIDLRX Quota : 250000000 Bytes Current : 140305441 Bytes Used(%) : 56% Object : T:\HD1\UDIETRD Quota : 250000000 Bytes Current : 53772515 Bytes Used(%) : 22% Object : T:\HD1\UDIFRBX Quota : 250000000 Bytes Current : 63196422 Bytes Used(%) : 25% Object : T:\HD1\UDIGGSX Quota : 250000000 Bytes Current : 32722470 Bytes Used(%) : 13% Object : T:\HD1\UDILLBX Quota : 250000000 Bytes Current : 98329 Bytes Used(%) : % Object : T:\HD1\UDILLJ1 Quota : 250000000 Bytes Current : 111969540 Bytes Used(%) : 45% Object : T:\HD1\UDINELM Quota : 250000000 Bytes Current : 23118920 Bytes Used(%) : 9% Object : t:\HD1\UDIXOA1 Quota : 250000000 Bytes Current : 0 Bytes Used(%) : 0% Object : T:\HD1\UDIXOMD Quota : 250000000 Bytes Current : 4518573 Bytes Used(%) : 2%