in reply to Regular expressions

Just in case this is 'new' info for you, the ".*" (fondly known as 'dot splat') in

$line =~ /(Starting strongSwan.*IPsec$)/

will match ZERO or more instances of ANY char except a newline. The asterisk is a quantifier (NOT A WILDCARD; that's the dot). For more, see perldoc.perl.org/perlre.html or type (at your console) perldoc perlre (or if you need to perldoc perlretut) and similar.