export PS1=$( make_a_red_prompt.pl ) #### #!/usr/bin/perl use strict; use warnings; my $cmd = q( \e[0;31m[\u@\h \W]$ \e[m ); print $cmd , "\n"; #### eval $( export_a_red_prompt.pl ) #### #!/usr/bin/perl use strict; use warnings; my $cmd = q( export PS1="\e[0;31m[\u@\h \W]$ \e[m " ); print $cmd , "\n"; #### #!/usr/bin/perl use warnings; use strict; use Term::ANSIColor; my $prompt = colored ("Prompt", 'bold red on_white'); print "export PS1=$prompt\n";