Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use warnings;
- print "What is your word that has six characters?\n";
- $word = <>;
- chomp($word);
- print( substr($word, 0, -1) . "\n" );
- print( substr($word, 0, -2) . "\n" );
- print( substr($word, 0, -3) . "\n" );
- print( substr($word, 0, -4) . "\n" );
- print( substr($word, 0, -5) . "\n" );
- print( substr($word, 0, -6) . "\n" );
Advertisement