467,104 Members | 971 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,104 developers. It's quick & easy.

Error message during runtime

When I tried to run my application, it says

Global symbol "%files" requires explicit package name at c:\codes\testing2.pl line 9.

Can anybody tell me what does this means and how to I solve this? I googled it but I still dont get it.
Aug 12 '08 #1
  • viewed: 1051
Share:
4 Replies
eWish
Expert 512MB
When you are using the strict pragma you have to declare your variables first. This is done using the my function.

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2.  
  3. my %hash;
  4.  
------------------------------------------------------------
Pragmas (perl 5.8.8) used :
  • strict - Perl pragma to restrict unsafe constructs



--Kevin
Aug 12 '08 #2
KevinADC
Expert 2GB
When you are using the strict pragma you have to declare your variables first. This is done using the my function.

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2.  
  3. my %hash;
  4.  
------------------------------------------------------------
Pragmas (perl 5.8.8) used :
  • strict - Perl pragma to restrict unsafe constructs



--Kevin
The code converter is no longer a virgin. :)
Aug 12 '08 #3
When I tried to run my application, it says

Global symbol "%files" requires explicit package name at c:\codes\testing2.pl line 9.

Can anybody tell me what does this means and how to I solve this? I googled it but I still dont get it.
try below code.

Remember whenever u r using use strict pragma u should declare all variables with my.

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2.  
  3. my %files;
Aug 16 '08 #4
KevinADC
Expert 2GB
When I tried to run my application, it says

Global symbol "%files" requires explicit package name at c:\codes\testing2.pl line 9.

Can anybody tell me what does this means and how to I solve this? I googled it but I still dont get it.

try below code.

Remember whenever u r using use strict pragma u should declare all variables with my.

use strict;

my %files;
post your code perl, use code tags.
Aug 16 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Wayno | last post: by
5 posts views Thread by Bob Bamberg | last post: by
2 posts views Thread by Maximus | last post: by
9 posts views Thread by JTrigger | last post: by
2 posts views Thread by menkaur | last post: by
2 posts views Thread by Kevin Burton | last post: by
reply views Thread by aartinawani@hotmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.