prasaduco has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use 5.10.1; use strict; use warnings; @wt = (1,2,3,4); print $wt[2];
The above code was used on Windows 7. When I use the dos prompt to type
perl pArray.plx </p> and hit enter, I get the the following error mes +sage: <code> C:\strawberry\perl\programs>perl pArray.plx Global symbol "@wt" requires explicit package name at pArray.plx line +6. Global symbol "@wt" requires explicit package name at pArray.plx line +8. Execution of pArray.plx aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Global Symbol issue while using arrays
by ikegami (Patriarch) on Jun 07, 2011 at 05:58 UTC | |
|
Re: Global Symbol issue while using arrays
by davido (Cardinal) on Jun 07, 2011 at 06:58 UTC | |
by prasaduco (Initiate) on Jun 07, 2011 at 07:12 UTC | |
by davido (Cardinal) on Jun 07, 2011 at 07:20 UTC | |
|
Re: Global Symbol issue while using arrays
by Khen1950fx (Canon) on Jun 07, 2011 at 06:11 UTC | |
by prasaduco (Initiate) on Jun 07, 2011 at 06:46 UTC | |
by Anonymous Monk on Jun 07, 2011 at 08:08 UTC |