in reply to Automatic verb inflection script

Here's your problem:
my ($present_1,$present_2,$present_3,$present_4,$present_5) = $verb;
I assume you want all of the variables to be initialized with $verb. Howevr, this statement only sets $present_1 and the rest will be set to undef.

A quick fix is to write:

my ($present_1, ...) = ($verb) x 5;

Another approach to this would be to first compute the verb stem and then just add the appropriate ending:

my $stem = $verb; $stem =~ s/er$//; my $present_1 = $stem . "e"; my $present_2 = $stem . "es"; ...
For your group 1 verbs, this can be very compactly written:
my @present_endings = qw(e es ons ez ent); my @present = map { $stem . $_ } @present_endings; ...etc for the other tenses...
In fact, you might be able to make use of the module Lingua::Stem::Fr.

Replies are listed 'Best First'.
Re^2: Automatic verb inflection script
by gojippo (Novice) on May 20, 2008 at 03:53 UTC
    Wow, you and samtregar replied almost at the same time.

    I got my solution thanks to you two. Thank you for your precious help ! I will check out the stem module, could be of good help.