Advertisement
Guest User

Untitled

a guest
Feb 6th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.30 KB | None | 0 0
  1. #!/usr/bin/env perl
  2.  
  3.  
  4. use Term::ANSIColor;
  5.  
  6.  
  7. $strng = "ZihtqTL5R6Ha";
  8.  
  9.  
  10. foreach my $char (<STDIN>){
  11.  
  12. if ($char == substr($strng, 0, 1)) {
  13.     print colored(['bold red'], "$char");
  14. } elsif (index($char, substr($strng, 1,)) != -1) {
  15.     print colored(['green'], "$char");
  16.     } else {print $char;}
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement