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;
In reply to Re: use the cut function in a script
by vinoth.ree
in thread use the cut function in a script
by raghu_shekar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |