http://qs321.pair.com?node_id=700662


in reply to split line

If you pass a single blank space to split, it behaves magically and removes all leading spaces:
use strict; use warnings; use Data::Dumper; my $line = " 0 10 9 4 1 0 0 0 2 2 1 1 0"; my @config = split " ", $line; print Dumper \@config;