[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] From the Perl Conference 3.0 Perl quiz (2)



At 08:27 PM 8/25/99 -0400, Keith Calvert Ivey wrote:
>Prakash Kailasa <PrakashK@bigfoot.com> wrote:
>
> > Spoiler ---
> >           |
> >           v
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > It prints 1.
> >
> >     use constant e => 2, pi => 3;
> >
> > This really creates a list constant (2, 'pi', 3);
> >
> >     print e ** pi;
> >
> > is really,
> >
> >     print '2pi3' ** 'pi'
>
>Not quite.  You mean
>
>       print ((2, 'pi', 3) ** 'pi');

No, actually, he's right... try doing:

print e;

He's correct. :)  Orwant was wrong (he said it would contain "2") but it 
really contains "2pi3"

D



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe