Using the following code, I want to create a hash or individual lists.  Of
course, this code doesn't work....

What do I need to change to correct my error?

--- Code follows -----------------------

#!/perl/bin/perl

use strict;
my %printQueue;

push($printQueue{A}, 'This is the first line in A');
push($printQueue{A}, 'This is the second line in A');
push($printQueue{A}, 'This is the third line in A');
push($printQueue{A}, 'This is the fourth line in A');
push($printQueue{A}, 'This is the fifth line in A');
push($printQueue{B}, 'This is the first line in B');
push($printQueue{B}, 'This is the second line in B');
push($printQueue{B}, 'This is the third line in B');
push($printQueue{B}, 'This is the fourth line in B');
push($printQueue{B}, 'This is the fifth line in B');
push($printQueue{C}, 'This is the first line in C');
push($printQueue{C}, 'This is the second line in C');
push($printQueue{C}, 'This is the third line in C');
push($printQueue{C}, 'This is the fourth line in C');
push($printQueue{C}, 'This is the fifth line in C');


foreach my $key ('A', 'B', 'C') {
        foreach my $text ($printQueue{$key}) {
                print("$text \n");
        }
}

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to