use strict; use warnings; my $rec = 'a b c d 96'; my $ads = (split /\s+/, $rec)[-1]; print "ads=$ads\n"; __END__ ads=96