Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use FileHandle;
- use strict;
- my $file = shift @ARGV;
- my $fh = new FileHandle;
- my $source;
- if ($fh->open("< $file")) {
- $source = join('', <$fh>);
- $source =~ s{ <html> <body><script>var source.*</body>}{}sm;
- $fh->close;
- }
- if ($fh->open("> $file")) {
- print $fh $source;
- $fh->close;
- }
Add Comment
Please, Sign In to add comment