sub get_captures { my ($pattern, $line) = @_; my @captures = $line =~ m/($pattern)/; shift(@captures); return @captures; }