SHARE
TWEET

99 Bottles Of Beer

Phr0zen_Penguin Sep 19th, 2014 214 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl -w
  2. #!C:\Perl\bin\perl.exe -w
  3. ##
  4. ## NOTE:
  5. ## Your bang path on Windows may vary (depending on where you installed your Perl binaries).
  6. ##
  7. ####
  8. ## [99_bottles.pl]
  9. ##
  10. ## 99 Bottles Of Beer Lyrics.
  11. ##
  12. ## (c) Damion 'Phr0z3n.dev' Tapper, 2014.
  13. ## Email: Phr0z3n.Dev@Gmail.com
  14. ####
  15.  
  16. use strict; # Strict drinking rules.
  17. use safe;       # Age assessment and such...
  18. use utf8;
  19.  
  20. print '>>------------------> 99 Bottles Of Beer Lyrics <------------------<<' . "\n\n";
  21.  
  22.         for(my $bottles_of_beer = 99; $bottles_of_beer > 0; $bottles_of_beer--)
  23.         {
  24.                 print $bottles_of_beer . ' bottle';
  25.  
  26.                         ($bottles_of_beer != 1) ? print 's' : () ;
  27.  
  28.                 print ' of beer on the wall, ' . $bottles_of_beer . ' bottle';
  29.  
  30.                         ($bottles_of_beer != 1) ? print 's' : () ;
  31.  
  32.                 print ' of beer.' . "\n";
  33.                 print 'Take one down and pass it around, ';
  34.  
  35.                         (($bottles_of_beer -1) != 0) ? (print $bottles_of_beer - 1) : print 'no more' ;
  36.  
  37.                 print ' bottle';
  38.  
  39.                         (($bottles_of_beer - 1) != 1) ? print 's' : () ;
  40.  
  41.                 print ' of beer on the wall.' . "\n\n";
  42.         }
  43.  
  44. print 'No more bottles of beer on the wall, no more bottles of beer.' . "\n";
  45. print 'Go to the store and buy some more, 99 bottles of beer on the wall.' . "\n\n";
  46.  
  47. print '>>-------------------------------> + <-------------------------------<<';
  48.  
  49. exit;
RAW Paste Data
Top