How to make perl's grep work like unix grep

Discussion in 'Programming' started by popowich, Feb 24, 2010.

  1. #1
    Hello,

    I've been banging my head for a while this morning. Is there a way to make perl-s grep function work like unix's?

    Specifically I want to use -w to create something that works like grep -w :

    @results = grep -w (/$foo/, @bar);

    -Raymond
     
    popowich, Feb 24, 2010 IP