Applying pattern match (m//) to @array will act on scalar(@array) at /home/scripts/x.pl line 51.