Help for this page

Select Code to Download


  1. or download this
      DB<1> $_='abc'; s/a(b)c/$1/; print $_
    b
      DB<2> $_='abc'; s/a(b)c/$1/e; print $_
    b
    
  2. or download this
      DB<1> $_='abc'; s/a(b)c/$1/; print $_
    b
      DB<3> $_='abc'; m/a(b)c/; $_ = "$1" ; print $_
    b
    
  3. or download this
      DB<2> $_='abc'; s/a(b)c/$1/e; print $_
    b
      DB<4> $_='abc'; m/a(b)c/; $_= eval '$1'; print $_
    b
    
  4. or download this
      DB<5> $_='warn 666'; s/(.*)/$1/e; print $_
    warn 666
      DB<6> $_='warn 666'; m/(.*)/; $_= eval '$1'; print $_
    warn 666
    
  5. or download this
     
      DB<7> $_='warn 666'; s/(.*)/$1/ee; print $_
    666 at (eval 171) ....    # skipped error message
    ...
      DB<8> $_='warn 666'; m/(.*)/; $_= eval eval '$1';  print $_
    666 at (eval 175). ... # skipped error message
    1      # $_ = return code from warn
    
  6. or download this
      DB<134> $hash{b}=666;
     
    ...
    666
      DB<136> $_='abc'; m/a(b)c/; print "$hash{$1}";
    666