in reply to remove duplicate value in array

When you want distinct values think hash.

my %seen; @content = grep !($seen{$_}++), split( / /, $content );