I can't remeber why this happens or how to fix it. but when I have info in and array and parse it with a foreach loop them push the line into an new array then print it does it do some thing like this
info
info2
info3
info4
info5
1st is flush and the all the rest of the lines are 1 space...
I'm writing a script to check mail quota for each user and warn them accordingly. I ran into a problem when i tried to compare a user list from the passwd file to the listed boxes in /var/mail. I want to eliminate out of the passwd list what i not in the /var/mail list. i have pushed one list in...
I have a situation where I'm getting the file sizes from a directory using du -ks and I split the line into numbers and directories. In the variable representing the numbers they are all left aligned and I want them to be right aligned. how do I do this ?
Please tell me how to do this. here is an example of the current part of the script i'm working with. If I paste a small paragraph from note pad in windows it chops at the 1st carriage return. How do I make SDTIN accept the whole paragraph?
print "What will the subject be[]?"...
Hi, does perl have a module to help me with a small problem on date changing.
I have a script which zips up archived log files and names them with the date minus 1 since the logs are from the previous day. The issue here is when I get to the 1st day of the next month the file would be called...
Ok I figured out hos to fix the problem, now when I try to mail it to my self and it is from a solaris server, when i get them mail the part of it with the list is all smooshed togather.
here is the whole script. maybe this help you see it better.
#!/usr/bin/perl
$server=`uname -n`;
chomp ($server);
$username="newtarg1";
chomp ($username);
$path="/usr/home/$username/www/vhosts";
chomp ($path);
$dtchk=`date`;
chomp ($dtchk);
($a1,$a2,$a3,$a4,$a5,$a6) = split...
Believe it or not $vall = join ("","\b","(directory)",$f2," ","(size)",$f1," ","kilobytesn"); seemed to work,but when the form is mailed to me the results have
result
[]
result
[]
result
the substitution thing did not work...
Thank you for the tip but it still did not work.
here is the result. notice how the 1st one is right.
(directory)abnonline (size)5822 kilobytes
(directory)beactiveamericaorg (size)2446 kilobytes
(directory)birchhortoncom (size)7732 kilobytes
(directory)blacksocietypages (size)21190...
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,"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.