Missing $ on loop variable
Posted
by k0re
on Stack Overflow
See other posts from Stack Overflow
or by k0re
Published on 2010-06-07T09:10:22Z
Indexed on
2010/06/07
9:12 UTC
Read the original article
Hit count: 153
Hi,
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my @array = qw[a b c];
6 foreach my($a,$b,$c) (@array) {
7 print "$a , $b , $c\n";
8 }
I receive following error: Missing $ on loop variable What is wrong?
I am using: perl v5.10.1 (*) built for x86_64-linux-thread-multi
© Stack Overflow or respective owner