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;
In Section
Seekers of Perl Wisdom