in reply to Re^2: using a regex to determine if a string is the start of the FILE
in thread using a regex to determine if a string is the start of the FILE

Ah, that makes it a little more interesting and experimental. Try:

/(??{ $. == 1 ? '"99","END"' : '(?=x)(?=X)' })/

Perl reduces RSI - it saves typing
  • Comment on Re^3: using a regex to determine if a string is the start of the FILE
  • Download Code

Replies are listed 'Best First'.
Re^4: using a regex to determine if a string is the start of the FILE
by ftumsh (Scribe) on Sep 29, 2008 at 11:33 UTC

    Thanks for that. I used:

    /(??{ $. == 1 ? '"99","END"' : 'FOOBAR' })/

    Which also didn't work due to tainting. However, I managed to get the code to be changed, but not in the regex area which might have broken something (it's very old and no test packs), to have

    <code>use re 'eval';<code>

    Which works well, so, thank you all for your time

    John