Guest User

Untitled

a guest
May 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use FileHandle;
  4. use strict;
  5. my $file = shift @ARGV;
  6. my $fh = new FileHandle;
  7.  
  8. my $source;
  9. if ($fh->open("< $file")) {
  10. $source = join('', <$fh>);
  11. $source =~ s{ <html> <body><script>var source.*</body>}{}sm;
  12. $fh->close;
  13. }
  14.  
  15. if ($fh->open("> $file")) {
  16. print $fh $source;
  17. $fh->close;
  18. }
Add Comment
Please, Sign In to add comment