> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/perl6-rosettacode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/perl6-rosettacode/programming_tasks/c/conjugate_a_latin_verb.md).

# Conjugate a Latin verb

```perl
for <amāre dare> -> $infinitive {
    say "\nPresent active indicative conjugation of infinitive $infinitive.";
    my $verb = ($infinitive ~~ /^ (\w+) ['a'|'ā'] 're' $/)[0];
    say $verb ?? (conjugate $verb) !! "Sorry, don't know how to conjugate $infinitive"
}

sub conjugate ($verb) { ($verb X~ <ō ās at āmus ātis ant>).join: "\n" }
```

#### Output:

```
Present active indicative conjugation of infinitive amāre.
amō
amās
amat
amāmus
amātis
amant

Present active indicative conjugation of infinitive dare.
dō
dās
dat
dāmus
dātis
dant
```
