develooper Front page | perl.perl5.porters | Postings from August 2001

pack "b*" isn't dwim enough

Thread Next
From:
H . Merijn Brand
Date:
August 23, 2001 10:01
Subject:
pack "b*" isn't dwim enough
Message ID:
20010823184055.E0C1.H.M.BRAND@hccnet.nl
Though I did read the doc's and used it more than once, I keep trying to do

use integer;
my @bar = map { rand 1 } ( 0 .. 100 );
my $foo = pack "b*", @bar;

where I should have used

my $foo = pack "b*", join "", @bar;

Why not support the first?

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 628 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About