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

Re: [PBML] key reference inside of a hash

Expand Messages
  • 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 1 of 7 , Jul 3 8:35 AM
    • 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.