in reply to qw() and lists of lists
You may like Syntax::Feature::Qwa, but it's a pretty heavy dependency unless you're defining a lot of arrayrefs, and really hate typing square brackets.
use 5.010; use strict; use warnings; use syntax 'qwa'; use Data::Dumper; my @nametape = ( qwa( 24 101 ), qwa( 25 102 ), qwa( 23 103 ), ); print Dumper \@nametape;
If the arrayrefs are just numbers, then map and split might be your friends:
use 5.010; use strict; use warnings; use Data::Dumper; my @nametape = map [split ":"] => qw( 24:101 25:102 23:103 ); print Dumper \@nametape;
|
|---|