Hi All

today i spend a lot of time with following problem.

part of code:

use constant {
        A => 1,
        B => 2,
        C => 3 };

@a = (1, 2, 3);
@b = (A, B, C);

# first loop
while(my $i = shift @a) {
        print $i, $/
}

# second loop
while(my $i = shift @b) {
        print $i, $/
}

My question is why the first loop work as expected, but
second doesnt.

Thanks

-- 
If you think of MS-DOS as mono, and Windows as stereo,
 then Linux is Dolby Digital and all the music is free...

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to