Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2004-06-13, 02:09 PM   #19
airdick
Shut up brain, or I'll stab you with a Q-tip!
 
Join Date: Aug 2003
Posts: 114
I hope nobody minds if I stick my nose in here. I've been following the thread hoping that a perl wizard would post some cool code that I can stash in my toolbox.

The errors that Cleo reports look to me like they were generated by the shell, not by perl. When I try to execute the perl script I get a different error. I can come close to reproducing the error if I attempt to run the script as a bash shell script (which we would expect to fail):

ejl@dangpow:~$ bash test.pl

test.pl: undef: command not found
test.pl: line 4: syntax error near unexpected token `s/(/<'
test.pl: line 4: `s/(/<script language="JavaScript1\.2">.*?document\.captureEvents\(Event\.MOUSEUP\).*?document\.captureEvents\(Event.MOUSEDOWN\).*?<\/script>)//sm;'

###########
Here is the error I get running the perl script:

ejl@dangpow:~$ ./test.pl some.html

Unmatched ( before HERE mark in regex m/( << HERE / at ./test.pl line 4.


ejl@dangpow:~$ find . -name some.html -exec test.pl {} \;

Unmatched ( before HERE mark in regex m/( << HERE / at ./test.pl line 4.

###########
ejl@dangpow:~$ cat test.pl

#!/usr/bin/perl -pi

undef $/;
s/(/<script language="JavaScript1\.2">.*?document\.captureEvents\(Event\.MOUSEUP\).*?document\.captureEvents\(Event.MOUSEDOWN\).*?<\/script>)//sm;

###########
ejl@dangpow:~$ /usr/bin/perl -v

This is perl, v5.6.1 built for i686-linux

ejl@dangpow:~$ uname -a

Linux dangpow 2.4.26 #1 SMP Tue Apr 20 20:19:50 PDT 2004 i686 unknown
airdick is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:38 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc