retro64xyz

370 2.1

Feb 9th, 2023
1,594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.34 KB | Cybersecurity | 0 0
  1. #!/usr/bin/perl
  2. use warnings;
  3.  
  4. print "What is your word that has six characters?\n";
  5. $word = <>;
  6. chomp($word);
  7. print( substr($word, 0, -1) . "\n" );
  8. print( substr($word, 0, -2) . "\n" );
  9. print( substr($word, 0, -3) . "\n" );
  10. print( substr($word, 0, -4) . "\n" );
  11. print( substr($word, 0, -5) . "\n" );
  12. print( substr($word, 0, -6) . "\n" );
Advertisement