Loading ...
Sorry, an error occurred while loading the content.

"requires explicit package name"

Expand Messages
  • barjesse37
    My difficulty is this: In this code foreach my $coded (sort keys %main::codestructure) { foreach my $wording (sort $main::codestructure{@coded}) { print
    Message 1 of 2 , Aug 4, 2008
    • 0 Attachment
      My difficulty is this:
      In this code

      foreach my $coded (sort keys %main::codestructure) {
      foreach my $wording (sort $main::codestructure{@coded}) {
      print "\t\t$coded\t$wording\n";
      print "\n";
      };
      };

      I receive this error

      Global symbol "@coded" requires explicit package name at codest08.pl
      line 111.

      (line 111 being the 2nd foreach line)
      Can anyone help me?
    • merlyn@stonehenge.com
      ... barjesse37 My difficulty is this: barjesse37 In this code barjesse37 foreach my $coded (sort keys %main::codestructure) { barjesse37 foreach my
      Message 2 of 2 , Aug 4, 2008
      • 0 Attachment
        >>>>> "barjesse37" == barjesse37 <barjesse37@...> writes:

        barjesse37> My difficulty is this:
        barjesse37> In this code

        barjesse37> foreach my $coded (sort keys %main::codestructure) {
        barjesse37> foreach my $wording (sort $main::codestructure{@coded}) {
        barjesse37> print "\t\t$coded\t$wording\n";
        barjesse37> print "\n";
        barjesse37> };
        barjesse37> };

        barjesse37> I receive this error

        barjesse37> Global symbol "@coded" requires explicit package name at codest08.pl
        barjesse37> line 111.

        Yes. Where is the declaration for @coded, which has nothign to do with
        your $coded. Perl is rightfully being annoyed.

        --
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
        <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
        Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
        See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
      Your message has been successfully submitted and would be delivered to recipients shortly.