Perl Bug???

M

Michele Dondi

While you're correct that the OP's assumption was wrong, this example
does not demonstrate that. Here, you're only printing $_ within the
loop. If the OP had been correct and $_ was in fact a copy of the
values of @a, the output would be the same. The example you meant to
type was:
perl -le'@a=qw/foo bar/; $_ x= 2 for @a; print for @a;'

(or

perl -le'@a=qw/foo bar/; $_ x= 2 for @a; print "@a"'
)

You're right of course.


Michele
 
M

Michele Dondi

By your 20 year example you imply (perhaps not intentionally) that
it's unlikely to find a bug in Perl because it's been around for 20
years. I only pointed out there has been several releases with in that
time span all having their own bugs unique to the previous versions...
It's an evolving languaging.. Bugs are expected Paul.

Oh, C'mon, you're *very partially* right: what he wrote *may* have
been misunderstood. Not a good reason to whine about it. I, for one,
understood the original text the way he later stated it was meant.
Let's go on to more interesting stuff, please!


Michele
 
M

Michele Dondi

Uh, why not?

Whenever my 2 year old is at the keyboard of my computer, he almost
immediately succeeds in making it do stuff I didn't know it could do
(like putting my computer in standby mode), just by hitting a few
unexpected keys.

Hehe, my girlfriend recently told me she had a five years old or so
kid thumping at her portable pc and he managed to change the wireless
settings, which she had been unable to! Isn't this terrific?


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top