fork download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use feature "switch";
  5. while(my $line=<DATA>){
  6. given ($line) {
  7. when (/push/) { print 'found push' }
  8. when (/add/) { print 'found add' }
  9. }
  10. }
  11. __DATA__
  12. push constant 7
  13. push constant 8
  14. add
Success #stdin #stdout 0s 3696KB
stdin
Standard input is empty
stdout
found pushfound pushfound add