in reply to warnings and grep problem

It's not matching the second regular expression grouping; are you sure the first group isn't being too "greedy?"

UPDATE: Also, I may be reading this wrong, but shouldn't there be a g after the regular expression? (meaning you want to do this for all modules, not just the first one)

_________________________________________________________________________________

I like computer programming because it's like Legos for the mind.

Replies are listed 'Best First'.
Re^2: warnings and grep problem
by jeanluca (Deacon) on Jun 20, 2006 at 15:07 UTC
    when use
    return grep { s/(\Q$dir\E)(\w+)(\.pm)$/$2/g } %$packlist ; or return grep { s/(\Q$dir\E)(\w+?)(\.pm)$/$2/g } %$packlist ;
    gives me the same errors.
    I think this problem occures when it encounters something like /usr/lib/perl5/site_perl/5.8.7/My_Package/Sub_Package/Some_Module.pm.swp

    Luca