SPUG: a split question . . .

Dean Hudson dean at ero.com
Thu Feb 24 14:50:07 CST 2000


On Tue, 22 Feb 2000, Patterson, David S (David) wrote:

> This is a really cool trick!  I can't believe I've never seen it before
> now...  I had to go back to the blue camel book (Programming Perl, Wall &
> Schwartz) and find it before I could believe it.  It's actually documented
> on pg 48, but in a rather academic way--the example never mentions the
> beauty of using it in something like split.  It just proves that you can
> never completely "learn" a language.  People are always finding new ways to
> use the tools in any toolbox...

It's also really handy with stat() and any of the getpwyada() builtins;
they often return a mess of data that you're not interested in.

dean.
--
my $email = qr{ dean(h)?@(?(1)verio\.net    # work
                            | ero\.com) }x; # other


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list