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

This is common statement *but*... these are language features that sane
people don't use. They are obfuscated, non-obvious and difficult to use.
That said, when the moon is in the right phase and you just happen to need
something that does this it's handy to have around.

In addition, this multiple-type feature of perl isn't something that
people use in most cases except for it's benign and "correct" ways. This
usually looks like:

for (my $i = 0;
     $i < 10;
     $i++) {
   print $i,"\n";
}

or in poorer form:

for (my $i = '0';
     $i < '10';
     $i+='1') {
   print $i,"\n";
}

Sure having this sort of ability allows you to screw up. It also lets you
do more cool stuff without having sweat things like .toString() all the
time. Not that .toString() is hard, it's just a bit more to thing about.

Anyway, I code as if my strings are always string and integers are always
integers with an implicit printf("%i",i) available (which is in fact what
happens. That's where that string pointer comes in for integer values)

Joshua b. Jore
Minneapolis Ward 3, precinct 10
http://www.greentechnologist.org

On Fri, 9 Nov 2001, Mike Bresnahan wrote:

> You just illustrated my major complaint about Perl.
>
> Mike
>
> > -----Original Message-----
> > From: tclug-list-admin at mn-linux.org
> > [mailto:tclug-list-admin at mn-linux.org]On Behalf Of Joshua b. Jore
> > Sent: Friday, November 09, 2001 11:39 AM
> > To: tclug-list at mn-linux.org
> > Subject: Re: Learning CGI Database Wizardry (Was Re: [TCLUG] PostgreSQL
> > Ad vocacy (was Re: <TROLL> (was ...)))
> >
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Uh... no. perl variables aren't loose or untyped. They're just doubles,
> > string pointers and magic simultaneously. ;-) I had a weird moment when I
> > realized that a single scalar contain a double/integer value and
> > simultaneously an unrelated string value. That would be something like:
> >
> > $a = 'string';
> > $a = 1;
> >
> > and having both values be stored. Admittedly this level of perl trickery
> > involves having some C or XS code around but it's actually mentioned as a
> > possibility in one the perlguts manpage. And no, I'm not talking about
> >
> > $a = 'something';
> > @a = ('another thing');
> > %a = ('yet', 'another',
> >       'altogether', 'now.');
> >
> > ;-)
> >
> > I just like it that perl has structures explicitly named 'magic' and
> > 'more_magic' (a pointer to another 'majic' structure). It makes me think
> > of that more_magic story from the jargon file.
> >
> > Joshua b. Jore
> > Minneapolis Ward 3, precinct 10
> > http://www.greentechnologist.org
>
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (OpenBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE77GFdfexLsowstzcRAkCNAJ9QS2E5FLGbDcPyB7Rx0iMdtuMaLACdEqf7
iWnYXvw1SZkIFNbgqqR5BLs=
=XVcx
-----END PGP SIGNATURE-----