I have a problem which I have tried many different thing to solve it and failed.
I am pushing info from a join statement
@vhostsall =`du -ks *`;
foreach (@vhostsall){
($f1,$f2) = split (/\s+/,$_);
$vall = join ("","(directory)",$f2," ","(size)",$f1," ","kilobytes\n"
push(@VH2, $vall);
}
the results of this make on line all the way to the left and the rest of the lines begin with 1 space. I put a \b after the \n in the join statement and it worked for when I printed it out, but when i tried to write it to a file it went back to the leading space on each line. If I use \n any where but in the join statement everything is smashed togather.
I am pushing info from a join statement
@vhostsall =`du -ks *`;
foreach (@vhostsall){
($f1,$f2) = split (/\s+/,$_);
$vall = join ("","(directory)",$f2," ","(size)",$f1," ","kilobytes\n"
push(@VH2, $vall);
}
the results of this make on line all the way to the left and the rest of the lines begin with 1 space. I put a \b after the \n in the join statement and it worked for when I printed it out, but when i tried to write it to a file it went back to the leading space on each line. If I use \n any where but in the join statement everything is smashed togather.