in reply to Regular expression to match an A=B type string needs help in storing matched parts of string

It's not that $1 isn't being set. You're declarying $assigned_dir with my inside your if block. This means when you exit your block, $assigned_dir falls out of scope and is destroyed. Your log_msg function sees an undefined value.

Consider 'use strict'. It would have caught this.

  • Comment on Re: Regular expression to match an A=B type string needs help in storing matched parts of string
  • Select or Download Code