in reply to Parsing a line of text items

Use glob. But make sure the input doesn't contain *, ?, and {}.
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; sub parse_args { my ($input) = @_; return [glob $input] } use Test::More tests => 1; is_deeply parse_args('23 45.67 "John Marcus" Surname'), [23, 45.67, 'John Marcus', 'Surname'];

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]