Advertisement
kwasinski

loversDay.pl

Jun 12th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.70 KB | None | 0 0
  1. #!perl
  2.  
  3. package LoversDay;
  4.  
  5. @LoversDay::feelings = ('hate', 'love', 'happiness', 'lies', 'missing', 'trust'); # Thats feelings, ok?
  6. @LoversDay::result;
  7.  
  8. my $AnaLidia; # That's you
  9. my $Vinicius; # That's me
  10.  
  11. our $feelings;
  12. # take us to
  13. our $result;
  14.  
  15. # so our
  16. @result = grep { # Read grep as grip ;)
  17.     m/love|happiness|missing|trust/; # We do match these feelings, don't we? :3
  18. } @feelings;
  19.  
  20. $AnaLidia = $result[int( rand( ~~@result)) ]  if scalar $result;
  21. # and
  22. $Vinicius = $result[int( rand( ~~@$result))]  if scalar $result;
  23.  
  24. print "Ana Lidia and Vinicius have  ", join ', ', @result, 'together. Happy Lovers Day.'."\n", =~ s/\,\stogether/ together/r  if $AnaLidia and $Vinicius;
  25.  
  26. __END__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement