in reply to Extracting selected fields form file record

Yes. see slices (here: array slices) and, of course split. The syntax would be like
my ($first,$second,$third,$fourth,$fifth,$sixth) = (split(' ', $line)) +[0,1,3,5,7,9];

Replies are listed 'Best First'.
Re^2: Extracting selected fields form file record
by LanX (Saint) on Feb 06, 2022 at 18:31 UTC
    another way is filling in undef for the ignored fields

    my ($first,$second,undef,$third,undef,$fourth,undef,$fifth,undef,$sixth) = split / /, $line;

    please also note that split operates on regexes, so /\s+/ might be what is really wanted.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      A single space character (' ') is a special case. I admit that it is a bit buried in the split documentation. Of course, only at most OP knows whether leading whitespace should be kept…
        you are right and it will also handle leading whitespace! :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery