Joel wrote:
> Well, I got interested and changed this code to mess around with unicode
> characters. The problem is it still doesnt print what it's supposed to, and
> it makes the PC speaker on my computer beep. The simbols were a variety of
> musical ones, a happy face, lightning bolt, etc. None of them were card
> symbols.
>
> Any ideas?
Yes it is doing exactly what you tell it do do.
> #!/usr/bin/perl
>
> use warnings;
> use strict;
>
> my $h=15;
> my @word = (0x26A1, 0x2622, 0x2672, 0x2623, 0x2669, 0x266A, 0x266B, 0x266C,
> 0x266D, 0x266E, 0x266F, 0x262E, 0x262D, 0x263B, 0x260D);
> while ($h > 0) {
> $h--;
> my $letter=shift @word;
Here you tell the interpreter to reduce the number of elements by one. As a
side effect, you are storing the value of the element removed in a dead variable
> print chr(@word);
Now you are printing the character value of the size of the array. This shoule
run for 14 rounds, printing a countdown of charcaters from character 14.
> }
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>