in reply to How to get an integer sub string between two string

Hello ppp,

Splitting on the empty pattern, //, gives you every character separately. You want to split on whitespace, for example /\s+/. Update: Or use " " (a single space literal string) instead of a regular expression. See split, the paragraph beginning “As another special case, split emulates the default behavior of the command line tool awk...”

Note: if you know that the field you want is always the seventh in the line, you can get it directly, without declaring all those unused variables:

18:09 >perl -wE "my $line = 'Address: 100.64.52.97 Time Fri Jan 16 21: +44:35 2015 End'; say +(split /\s+/, $line)[6];" 21:44:35 18:11 >

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,