in reply to Re^2: Yet another config file editing programme : Tell me how to make it better !
in thread Yet another config file editing programme : Tell me how to make it better !

What do you think the value of $0 is in the line ?

warn "ip param key : $ip_params{$0}\n"; #TEST
  • Comment on Re^3: Yet another config file editing programme : Tell me how to make it better !
  • Download Code

Replies are listed 'Best First'.
Re^4: Yet another config file editing programme : Tell me how to make it better !
by dazz (Beadle) on Sep 09, 2021 at 10:16 UTC
    Hi
    I added the line:
    warn "ip param key : $ip_params{$0}\n"; #TEST
    and another for debugging to see if hash key $0 and value $1 returned anything. Both printed blank.


    Dazz

      Hey, can I join the "what did tybalt89 mean?" game? Sounds like fun. :)

      I think he meant that dazz needs to take a time out to read and understand perlretut and perlre before continuing. That you really need to understand what $0 and $1 mean, what they ought to contain, before printing them out and attempting to interpret their values. Hint: Read the Extracting Matches section at perlretut (and search for $0 and $1 in perlvar :).