Help for this page

Select Code to Download


  1. or download this
    Type of arg 1 to main::mygrep must be block or sub {} (not numeric eq 
    +(==)) at /tmp/mygrep line 7, near "10)"
    Execution of /tmp/mygrep aborted due to compilation errors.
    
  2. or download this
    sub mygrep { my $s = "grep $_[0]"; eval $s; }
    
    print for mygrep('$_ % 2 == 0, 0..10');    # :-)