#!/usr/bin/perl use strict; my $count=0; my @cp_op = "111 222 333"; foreach my $line (@cp_op) #splits each line of the array { print "$line\n"; $count ++; } print "$count\n";