[Wellington-pm] Pack/unpack - nagging guilt

Srdjan srdjan at catalyst.net.nz
Wed Jun 22 14:09:06 PDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mmmm, maybe not quite. /#(\w{4}){3}\b/ is probably better, because you may want
an empty array returned indicating a failure...

michael at diaspora.gen.nz wrote:
> Grant McLean writes:
> 
>> my @rgb = map { hex } "#FFFFCCCC3333" =~ /^#(....)(....)(....)/;
> 
> 
> I think you really mean:
> 
>     my @rgb = map(hex, "#FFFFCCCC3333" =~ /\w{4}/g);
> 
>     -- michael.
> _______________________________________________
> Wellington-pm mailing list
> Wellington-pm at pm.org
> http://mail.pm.org/mailman/listinfo/wellington-pm
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCudNxZtcHxCitRpgRApmFAJ0dLA5S0a0NkedqRBuxeX8FsrCcoQCfcoZW
LU6XhDTidSr6w2aiwWqT9xU=
=4p79
-----END PGP SIGNATURE-----


More information about the Wellington-pm mailing list