in reply to Re: Small question: Why can't I print "@-"?
in thread Small question: Why can't I print "@-"?

Right, thanks, this must be a version thing. If I use your code:

print "@-:@+\n" while 'the quick brown fox jumps over the lazy dog' =~ /(\b.+?\b)(.+ +?)\b/g

I get the following output:

@-:@+ @-:@+ @-:@+ @-:@+ @-:@+ @-:@+ @-:@+ @-:@+
whereas if I adapt it as per sauoq's suggestion below:

print "@{-}:@{+}\n" while 'the quick brown fox jumps over the lazy dog' =~ /(\b.+?\b)(.+ +?)\b/g

I get what I want.

I use AS 5.61 on XP

dave

Replies are listed 'Best First'.
Re: Re: Re: Small question: Why can't I print "@-"?
by thelenm (Vicar) on Sep 23, 2003 at 21:33 UTC

    Yep, this a known bug in 5.6.1, but it is fixed in 5.8.0.

    -- Mike

    --
    XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
    -- grantm, perldoc XML::Simpler

Re: Re: Re: Small question: Why can't I print "@-"?
by BrowserUk (Patriarch) on Sep 23, 2003 at 20:04 UTC

    Ah! I ran the sample on AS 5.8.0


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.