giany has asked for the wisdom of the Perl Monks concerning the following question:
Hy,
1).I`m trying to write a code that will show smth like this(It seems HTML has the same problem) :
User1 [Ok] USer100 [Ok] User1000 [Ok]
The problem is that when I print using this :
print color("white"), "\n $elt ", color("reset") . color("green") , "\ +t\t\t [Ok]", color("reset");
I get this :
User1 [Ok] USer100 [Ok] User1000 [Ok] ............... [Ok] ............ [Ok]
I want all to be in a corect order.[Ok] to be under an other [Ok].
Any hints?
2).The second issue is this : I`m tring to count smth and at the end to show only the things i`m interesed.. the code looks like this:
foreach $i ($elt) { $check = system($check . $elt); if ( $check > 0 ) { } elsif ( $check = 1 ) { chomp($elt); print color("white"), "\n $elt ", colo +r("reset") . color("green") , "\t\t\t [Ok]", color("reset"); } }
I want to count only the things i get on the elsif loop.
How do I do that?
Thank you!
Edit: g0n - added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Counter && print issue
by SamCG (Hermit) on Oct 07, 2005 at 16:23 UTC | |
|
Re: Counter && print issue
by sgifford (Prior) on Oct 07, 2005 at 17:00 UTC | |
by giany (Acolyte) on Oct 08, 2005 at 12:22 UTC | |
by sgifford (Prior) on Oct 08, 2005 at 16:09 UTC | |
|
Re: Counter && print issue
by Hue-Bond (Priest) on Oct 07, 2005 at 18:04 UTC | |
|
Re: Counter && print issue
by pg (Canon) on Oct 07, 2005 at 16:53 UTC | |
|
Re: Counter && print issue
by marto (Cardinal) on Oct 07, 2005 at 16:14 UTC | |
|
Re: Counter && print issue
by giany (Acolyte) on Oct 08, 2005 at 18:25 UTC |