Nice example but doesn't really help a bit more plain text would be better
Can you answer why @foo1 doesn't contain 666 and 123?
In your original question you say the array final1 and final2 are declared as global but i can only print them in there function. the print @final1 just below that and the print at the end do not work..... .
- "It doesn't work" is not a very good explanation (some would say it is not an explanation at all) (How (Not) To Ask A Question)
- my snippet demonstrates
why @final1 and @final2 don't contain what you expect.
@foo1 = 123; is not the same as push @foo1, 123;
what is a think-o?
Its a brain fart (dict thinko)
MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] [d/l] [select] |
@array = 1;
print "@array";
1
@array = 2;
print "@array";
2
@array = 1;
push @array, 2;
print "@array";
1 2
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
| [reply] [d/l] |