Dr.Ruud wrote: > Shawn H Corey wrote: > > >> push @list, (unpack( "A${i}A$size", $word ))[1]; > > Be careful with unpack "A", because it rtrims. > > > Best use "x" to skip, and "a" to capture. > > push @list, unpack "x${_}a$size", $word for 0 .. $max; > > > Funnily enough, that is somehow&what faster than > > push @list, map unpack( "x${_}a$size", $word ), 0 .. $max; > >
You don't need the push: my @list = map unpack( "x${_}a$size", $word ), 0 .. $max; -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/