in reply to Re: split and assign
in thread split and assign

And there's also:
>perl -wMstrict -le "my $line = 'foo=bar=baz'; my (undef, $schema_username) = split /=/, $line; print $schema_username; " bar
Update: Although it must be admitted that this approach would get a bit tedious if one were interested not in the second field but in the twenty-second!

Replies are listed 'Best First'.
Re^3: split and assign
by JadeNB (Chaplain) on Aug 03, 2009 at 07:22 UTC
    Although it must be admitted that this approach would get a bit tedious if one were interested not in the second field but in the twenty-second!
    I hoped for a mad moment that
    my ( ( undef ) x 21, $var ) = func;
    or at least
    ( ( undef ) x 21, my $var ) = func;
    would work—but they don't ….