my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/); ###()=>$Version now contains the number of matches. Probably one. #### #!/usr/bin/perl use strict; use warnings; my $teststr = "ciao a tutti"; my ($sep) = ($teststr =~ /\w+ (\w+) \w+/); print "result: [$sep]\n"; __END__ result: [a]