#!/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]