Help for this page

Select Code to Download


  1. or download this
      DB<1> @array = qw /foo foobar bar barfoo fobar foobaz /;
    
    ...
    foo foobar foobaz
      DB<7> print join " ", grep !/^\Q$user\E/, @array;
    bar barfoo fobar
    
  2. or download this
      DB<8> print join " ", grep !/^[$user]/, @array;
    bar barfoo
      DB<9> print join " ", grep /^[$user]/, @array;
    foo foobar fobar foobaz
    
  3. or download this
      DB<27> print join " ", grep /^${user}/, @array;
    foo foobar foobaz
      DB<28> print join " ", grep !/^${user}/, @array;
    bar barfoo fobar