my last solution was (anyway it puts a js comment "//" and next codes are invalid, but here were an unwanted bits in HD memory)
#!/usr/bin/perl -w use 5.010; use strict; use warnings; open (FINDIT, "find /home/auu/Documents/js -name '*.js' -type f -print + |") || die "Couldn't execute find!\n"; while (my $filename = <FINDIT>) { open (TABLETKA, "+<$filename") || die "Can't open a file $filename: $! +\n"; my @lines = <TABLETKA>; foreach (@lines) { print "$filename is cleaned\n" if s{(\;do.*)(</iframe>'\);)}{\; //eof} +; } seek(TABLETKA,0,0) || die; print TABLETKA @lines; close (TABLETKA); }
this is (above) is my final code, now I'm thinking how to integrate your code to my code... do you have any idea? ))...
In reply to Re^2: trouble with regular expressions
by programmer.perl
in thread trouble with regular expressions
by programmer.perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |