in reply to use the cut function in a script

If the tag is same for all the elements, try this also

use strict; use warnings; use Data::Dumper; my @array=('<NumData>1234</NumData>','<NumData>543535<NumData>'); my @Output; foreach my $data(@array){ $data=~ s/<NumData>|<\/NumData>//g; push @Output, $data; } print Dumper @Output;
Vinoth,G