while ( my $line = <DATA> ) { chomp $line; my @fields = qw( login uid gid name home + shell ); my @items = $line =~ /^([\-\w]+):x:(\d+):(\d+):([\-\w\s\(\)\,]*):([\w\/]+) +:([\w\/]+)$/ or die "Malformed input [$line]"; push @users, {}; $users[-1]{ shift @fields } = shift @items while @fields; }
In reply to Re: Getting rid of a temporary variable in AoH
by choroba
in thread Getting rid of a temporary variable in AoH
by reisinge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |