in reply to Re^5: get a certain number of words from a line
in thread get a certain number of words from a line

What do you get if you do
$x = \((0..3));
?

As a general rule, I would recommend use of [0..10] instead of the capricious \(0..10), since the former is always a way to get an array ref (and is a char shorter), while the latter is usually a way to make a list of references.


We're not really tightening our belts, it just feels that way because we're getting fatter.

Replies are listed 'Best First'.
Re^7: get a certain number of words from a line
by sleepingsquirrel (Chaplain) on Jun 16, 2004 at 01:31 UTC
    Must have been a bug in 5.8.0 that was causing the behavior. Upgrading to 5.8.4 makes it behave like everyone expects. Just for the record, here's what you get for the above query on 5.8.0...
    perl -e '$x = \((0..3)); print @$x' 0123


    -- All code is 100% tested and functional unless otherwise noted.