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

Re: [PBML] key reference inside of a hash

Expand Messages
  • merlyn@stonehenge.com
    ... Erwin Yeah you are right, I used ( ) in my code, just wrote this down and dont Erwin c&p that part, so I did the mistake. I ve stopped helping you now.
    Message 1 of 7 , Jul 2, 2008
    • 0 Attachment
      >>>>> "Erwin" == Erwin Krause <devnull@...> writes:

      Erwin> Yeah you are right, I used ( ) in my code, just wrote this down and dont
      Erwin> c&p that part, so I did the mistake.

      I've stopped helping you now. You aren't pasting things that
      are consistent with your problem.

      For example, you go on later to do this:

      Erwin> $config = (
      Erwin> ip => "192.168.1.1",
      Erwin> netmask => "255.255.255.0",
      Erwin> gw => sub{ some calculation with $config{'ip'} and $config{'netmask'}},
      Erwin> );

      And this is *also* broken syntax.

      If you WANT HELP,
      please paste REAL CODE.

      Stop typing in random code. PASTE THE ACTUAL CODE YOU ARE WONDERING ABOUT.

      Yes. It matters.

      --
      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
    • Erwin Krause
      Mh I m really sorry, but i dont have an syntax problem. But i can make this more imaginable #!/usr/bin/perl use strict; use warnings; %config = ( ip =
      Message 2 of 7 , Jul 3, 2008
      • 0 Attachment
        Mh I'm really sorry, but i dont have an syntax problem.
        But i can make this more imaginable

        #!/usr/bin/perl
        use strict;
        use warnings;
        %config = (
        ip => "192.168.1.1",
        netmask => "255.255.255.0",
        gw => sub{ print "this will fail: $config{'ip'}\n";},
        );
        0;

        I thought when i talk about forward declaration.
        And Yes, I'm not a perl programmer, I usually program code that doesn't
        use %,$,@ in front of the same variable. and there for I maybe
        misspelled this. And even its a little problem atm this is more a
        general question.
        I had also just ask about forward declarations or something like that.
        But I will test my posted code in future in a seperate programm and obey
        this rule.

        Best regards
        Erwin



        Randal L. Schwartz schrieb:
        > I've stopped helping you now. You aren't pasting things that
        > are consistent with your problem.
        >
        > For example, you go on later to do this:
        >
        > Erwin> $config = (
        > Erwin> ip => "192.168.1.1",
        > Erwin> netmask => "255.255.255.0",
        > Erwin> gw => sub{ some calculation with $config{'ip'} and $config{'netmask'}},
        > Erwin> );
        >
        > And this is *also* broken syntax.
        >
        > If you WANT HELP,
        > please paste REAL CODE.
        >
        > Stop typing in random code. PASTE THE ACTUAL CODE YOU ARE WONDERING ABOUT.
        >
        > Yes. It matters.
        >
      • merlyn@stonehenge.com
        ... Erwin Mh I m really sorry, but i dont have an syntax problem. Erwin But i can make this more imaginable Erwin #!/usr/bin/perl Erwin use strict; Erwin
        Message 3 of 7 , Jul 3, 2008
        • 0 Attachment
          >>>>> "Erwin" == Erwin Krause <devnull@...> writes:

          Erwin> Mh I'm really sorry, but i dont have an syntax problem.
          Erwin> But i can make this more imaginable

          Erwin> #!/usr/bin/perl
          Erwin> use strict;
          Erwin> use warnings;
          Erwin> %config = (
          Erwin> ip => "192.168.1.1",
          Erwin> netmask => "255.255.255.0",
          Erwin> gw => sub{ print "this will fail: $config{'ip'}\n";},
          Erwin> );
          Erwin> 0;

          my %config;
          %config = ( .... );

          That'll work for what you want.

          --
          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.