|
|
|
|
|
|
|
![]() |
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
![]() |
#26 |
Vagabond
|
I just went through the Perl 5.8 Changelog (I tried the script on 5.6) and nothing interesting in there. Thought they might've changed something.
If you just try this little script PHP Code:
|
![]() |
![]() |
![]() |
#27 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I'm getting this error
myscripts/remove-right-mouse-code.pl: undef: command not found myscripts/remove-right-mouse-code.pl: line 5: syntax error near unexpected token `s/(/<' myscripts/remove-right-mouse-code.pl: line 5: `s/(/<script language="JavaScript1\.2">.*?document\.captureEvents\(Event\.MOUSEUP\).*?document\.captureEvents\(Event.MOUSEDOWN\).*?<\/script>)// I have my scripts in a non public directory so I can't do a link but here is a copy and paste from it. #!/usr/bin/perl -pi undef $/; s/<script language="JavaScript1\.2">.*?document\.captureEvents\(Event\.MOUSEUP\).*?document\.captureEvents\(Event.MOUSEDOWN\).*?<\/script>//sm; |
![]() |
![]() |
![]() |
#28 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
$ myscripts/test.pl
hello $ |
![]() |
![]() |
![]() |
#29 | ||
Vagabond
|
Hmm, something is wrong here.
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#30 |
Vagabond
|
I could sort of reproduce the error in two ways.
1. Don't have a #!/usr/bin/perl -pi as the first line. 2. Have a space before #!/usr/bin/perl -pi |
![]() |
![]() |
![]() |
#31 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
I took at the empty lines in the script and got this error.
Unmatched ( in regex; marked by <-- HERE in m/( <-- HERE / at myscripts/remove-right-mouse-code.pl line 3. |
![]() |
![]() |
![]() |
#32 |
Shut up brain, or I'll stab you with a Q-tip!
Join Date: Aug 2003
Posts: 114
|
I'm betting on a blank first line..
![]() ooopss. i was a little slow on the reply. Now all that's left is the perl debugging. Last edited by airdick; 2004-06-13 at 05:48 PM.. |
![]() |
![]() |
![]() |
#33 | |
Vagabond
|
Quote:
![]() It's probably stuck in your cache. Here's a new url for you: http://www.sponsororganizer.com/FreeScripts/cleo2.html And remember, no empty lines in the beginning ![]() |
|
![]() |
![]() |
![]() |
#34 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
We Have Liftoff!
No errors in telnet and when I run top I see find running. There is 7 gigs in there so I guess this will take awhile. ![]() |
![]() |
![]() |
![]() |
#35 |
Vagabond
|
![]() |
![]() |
![]() |
![]() |
#36 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
Wow! This thread turned into a Perl workshop overnight!
![]() Cool stuff SwedeGuy. ![]()
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
#37 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
This has turned into a very interesting thread.
I really wish I knew more about this stuff. I know just enough to be somewhat dangerous. LOL I already checked some pages and the script is working very well. The directories and files are still full of spaces but it isn't that big of a deal. |
![]() |
![]() |
![]() |
#38 |
WHO IS FONZY!?! Don't they teach you anything at school?
Join Date: Feb 2004
Posts: 42
|
My 2 cents
Here are my 2 cents on this thread...
1. Be sure to backup your stuff - unless you have absolute faith - before running a search-and-replace script. If you cancel the script while it is working, you might wreck one file. (Plus, without any logging or output, you cannot know which file may be messed-up) 2. The script obviously cannot strip what it doesn't know. Therefore, where you wrote the right-clicking script differently, it won't strip it. Sure, one could make the regular expression a bit more flexible but it's troubles that could be avoided. Here are two suggestions to avoid those problems in the future : 1. If you gotta use Javascript, you might consider using *one* centralized included javascript. In our situation, you could have modified the javascript in question at will or it would make a single line to search-and-strip in all your files. Ex. Code:
<SCRIPT language=javascript src=http://blah/blockrightclick.js></SCRIPT> Code:
<!-- RightClickStart --> <script> my script to block right-click here </script> <!-- RightClickEnd --> Entreri. |
![]() |
![]() |
![]() |
#39 |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Yeah I made a tarball of the whole site before running this just incase something went horribly wrong.
As for the code I would never do something like this. This whole site was done in FrontPage with the server extensions by someone that had no idea what they were doing over 6 years. I've looked through many of the pages and have yet to find any pages with this code still in them so it looks like this worked extremely well. |
![]() |
![]() |
![]() |
#40 |
Shut up brain, or I'll stab you with a Q-tip!
Join Date: Nov 2003
Posts: 115
|
*cough*
man sed |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|