Advertisement
cwchen

[Perl 6] with demo.

Oct 5th, 2017
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.19 KB | None | 0 0
  1. my $food = "seafood";
  2.  
  3. with $food.index("hamburger") {
  4.     "{$food} is delicious.".say;
  5. } orwith $food.index("chip") {
  6.     "I like {$food} as well.".say;
  7. } else {
  8.     "No favored food".say;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement