fork(1) download
  1. #!/usr/bin/perl
  2. use feature 'say';
  3. use strict;
  4. use warnings;
  5. #use re 'debug';
  6.  
  7. my $str = "abcde\n fghij<FooBar>";
  8. say $str =~ /(.*)<FooBar>/s;
Success #stdin #stdout 0s 17896KB
stdin
Standard input is empty
stdout
abcde
		fghij