in reply to Re^2: How to use REGEX Match Variable from one 'While' String in Another 'While' String
in thread How to use REGEX Match Variable from one 'While' String in Another 'While' String

The regex match only had alphanumeric characters and underscores...

If your $pkt_file doesn't contain regular expressions, it's probably better to use \Q$pkt\E, because that'll prevent your program from doing unexpected things if $pkt does someday for whatever reason contain special characters. Similar to what AnomalousMonk wrote below about $1 $2 $3 etc. it's a "future-proofing" measure.

  • Comment on Re^3: How to use REGEX Match Variable from one 'While' String in Another 'While' String
  • Select or Download Code