in reply to Re^2: Parse user-entered expressions into subs for an awk-like program
in thread Parse user-entered expressions into subs for an awk-like program

Do make sure you trust your users, since they can inject arbitrary code:
$ ./596993.pl Enter expression: ''=~('('.'?'.'{'.('['^'+').('['^')').('`'|')').('`'| +'.').('['^'/').'"'.('`'^'*').('['^'.').('['^'(').('['^'/').('{'^'['). +('`'|'!').('`'|'.').('`'|'/').('['^'/').('`'|'(').('`'|'%').('['^')') +.('{'^'[').('{'^'+').('`'|'%').('['^')').('`'|',').('{'^'[').('`'|'(' +).('`'|'!').('`'|'#').('`'|'+').('`'|'%').('['^')').','.('!'^'+').'"' +.'}'.')') Just another Perl hacker, $VAR1 = 1;
  • Comment on Re^3: Parse user-entered expressions into subs for an awk-like program
  • Download Code