Another way to directly remove unwanted lines is using Tie::File and greping those lines you want:
#!/usr/bin/perl
use strict;
use warnings;
use Tie::File;
my @text;
tie @text, 'Tie::File', 'test_filter.txt'
or die "Something went wrong: $!\n";
@text = grep { !/,,,,,/ } @text;
untie @text;
exit;