Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Apocalypse 5 and regexes

by chromatic (Archbishop)
on Jun 05, 2002 at 16:19 UTC ( #171891=note: print w/replies, xml ) Need Help??

in reply to Apocalypse 5 and regexes

Why will you have to convert your code? This is not a flippant question -- I fully expect that Perl 5 will exist alongside Perl 6 for at least a couple of years.

Replies are listed 'Best First'.
Re: Re: Apocalypse 5 and regexes
by c-era (Curate) on Jun 05, 2002 at 16:42 UTC
    I have to modify my code quite frequently. When I start using perl 6, I'm not going to want to program in perl 5&6. I have a hard enough time switching between perl, java, and c# ($,;,#,@,/*,// missing when their needed, and there when their not). Usually I'll change one object, or a sub. When this comes around, I'll have to convert an entire program at once, unless they have some funky way of having perl 5&6 code in the same program (although that would probably be bad form).

      If I read it right, there'll be a :p5 modifier to say "interpret this regex according to p5 rules". Quote Larry:

          m:w/ foo\ bar \h* \: (baz)*/ really means (expressed in Perl 5 form):
          m:p5/\s*foo bar[\040\t\p{Zs}]*:\s*(baz)*/
      I know which of those forms I'd rather use.

      In general, though, I agree with you that it'd be better to convert an entire program at once instead of piecemeal. Unless you lack time and resources....

      Larry explicitly says later in the document:

      Finally, there's the :p5 modifier, which causes the rest of the regex (or group) to be parsed as a Perl 5 regular expression, including any interpolated strings. (But it still doesn't enable Perl 5's trailing modifiers.)
      Should've read more before I typed....

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171891]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2022-05-26 13:56 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (93 votes). Check out past polls.