http://bugzilla.spamassassin.org/show_bug.cgi?id=3852
------- Additional Comments From [EMAIL PROTECTED] 2005-03-21 21:18 -------
Subject: Re: better way to have user configs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> > > @sys = ( 1, 2, 3, 4, 5 );
> >
> > as far as I know, $sys[2] = undef; does the trick, right?
> > then if (defined $sys[2]) will return false to indicate deletion,
> > but "foreach" and scalar @sys will still indicate the right number
> > of elements.
>
> Well, @sys is the system array which we don't want to change.
sure, I was just talking about "an" array, one that happened
to be called @sys. ;)
> So we could do: $user[2] = undef, but that makes $user[0..1] = undef
> as well, so now it looks like 3 things are deleted. The only way to
> make the undef thing work is to copy over the original array and then
> do the undef, but of course then just splicing out the value would be
> better in that situation.
why does it make 0..1 undef?
perl -e 'my @foo=qw(a b c d e); $foo[2] = undef; print join(",", @foo);'
a,b,,d,e
looks good to me!
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFCP6pxMJF5cimLx9ARAlymAJ9GrqAz+LxsnCaGod7yyD20ec1OfwCggAFS
n43eU/5iU75aC08YlWjL1hQ=
=/z22
-----END PGP SIGNATURE-----
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.