no thats what I'm doing, and it works on my linux box. but now it's evident that Term::ANSIColor tries to translate tabs to blanks.
lanx@nc10-ubuntu:~$ perl use strict; use warnings; use Term::ANSIColor; my @systems=qw(SERVER1 SERVER2 SERVER3); foreach my $system (@systems) { print "Now powering on $system:"; print color 'bold red'; print " \t\t[DONE]\n"; print color 'reset'; } __END__ Now powering on SERVER1: [DONE] Now powering on SERVER2: [DONE] Now powering on SERVER3: [DONE] ^blanks^
Seems like in your environment the translation is broken.
Your solution works now, because you transfered the tabs out of colored().
Anyway this only works reliably as long as your "server" names all have the same length. Do you really have less than 10? ;-)
Cheers Rolf
In reply to Re^3: Question about oddities when printing a tab
by LanX
in thread Question about oddities when printing a tab
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |