Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Apocalypse 5 and regexes

by c-era (Curate)
on Jun 05, 2002 at 16:42 UTC ( [id://171901]=note: print w/replies, xml ) Need Help??


in reply to Re: Apocalypse 5 and regexes
in thread Apocalypse 5 and regexes

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).

Replies are listed 'Best First'.
Re (3): Apocalypse 5 and regexes
by VSarkiss (Monsignor) on Jun 05, 2002 at 17:01 UTC

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

    So:
        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....

    Update
    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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-18 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found