Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.62 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4.  
  5. use Term::UI;
  6. use Term::ReadLine;
  7.  
  8. my $term    = Term::ReadLine->new('prompt');
  9. my $reponse = $term->get_reply(
  10.   prompt  => 'Choisis une formule :',
  11.   choices => [ 'TVA 19.6', 'TVA 5.5', 'Augmentation', 'Reduction'],
  12.   default => 'TVA 19.6',
  13. );
  14. print "Vous avez choisi : $reponse\n";
  15. {
  16. if ( $reponse ='TVA 19.6' )
  17.  
  18. require "19.6.pl";
  19. return $term;
  20. }
  21. {
  22. if ($reponse ='TVA 5.5')
  23. require "5.50.pl";
  24. return $term;
  25. }
  26. {
  27. if ($reponse ='Augmentation')
  28. require "augmentation.pl";
  29. return $term;
  30. }
  31. {
  32. if ($reponse ='Reduction')
  33. require "reduction.pl";
  34. return $term;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement