in reply to use the cut function in a script

The unix "cut" command (which isn't quite suitable here) has a lot in common with the perl "split" function, especially if you use split inside an array slice:
my @tag_arr = qw(<NumData>1234567</NumData> <NumData>2345678</NumData> +); my @out_arr; for ( @tag_arr ) { push @out_arr, ( split /(\d+)/ )[1]; }
(I could have used  /[<>]/ as the regex for the split, and then the numeric string would be the third element, but splitting on (and capturing) the digit string seemed simpler somehow.)