in reply to Re: Re: RE question...yup, another one ;)
in thread RE question...yup, another one ;)

Which is better I suppose depends on personal style. Personally, I think that
perl -e 'for (0..300) {print "$_ -> ", chop, "\n"; }'
is best, but the best approach using a regex is, in my opinion,
perl -e 'for (0..300) {/(\d)$/ && print "$_ -> $1\n"; }'
I think it's better style to use parenthesis inside a regex to match data and put it in $1 than it is to assign the whole thing to a new variable and then remove everything except what you want.

Replies are listed 'Best First'.
Re: Re: Re: Re: RE question...yup, another one ;)
by snafu (Chaplain) on May 27, 2001 at 00:21 UTC
    Yeah. It was faster than mine too, noticeably...

    ----------
    - Jim