FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author: FAQ Date: 2001/08/30 20:44
When you get this error message, it typically means that you didn't upload the script in ASCII mode, or if you installed it directly on a Unix system, that you didn't convert it from its original DOS format to a regular Unix text format. What happens is that the file still contains carriage returns at the end of each line (^M in some editors), so when perl looks for a line that only contains the string 'EOF' -with *nothing* in front or after it- it doesn't find it... Solution : convert the script from its DOS format to a Unix format, either by uploading it in ASCII mode from your PC, or by removing the carriage returns on the Unix system. You can do that for instance by typing the following command in your shell : perl -pi -e 'tr/\r//d' awebvisit.txt People running the script on a Windows platform shouldn't have this problem. |
Re: FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author : Ace Williams Date: 2002/06/20 19:01
That didn't work for me? I'm using Linux with Perl 5.8.0. If I comment it out then it works fine but it won't print out my usage. Any other ideas? Thanks, Ace |
Re: FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author : Mike Date: 2002/06/21 14:48
You could replace the line $helpmsg = <<'EOF'; with this line : $helpmsg = q{ And the line EOF with this line : }; That is, basically replace the <<'EOF'; .... EOF with q{ ... }; When you start the script with your logfile(s) as parameters, you should then see a message on stderr saying : Reading logfile entries... Line 5000 Line 10000 and so on until it has read all logfile entries, followed by Read <NNN> entries from <start date> to <end date> etc. |
Re: FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author: sush Date: 2005/01/13 17:19
this suggestion worked for me. You could replace the line $helpmsg = <<'EOF'; with this line : $helpmsg = q{ And the line EOF with this line : }; |
Re: FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author : tjgu Date: 2006/12/06 08:35
I met this problem on Windows platform too. I do just as you told that replaced the line use Inline C => <<'END_C'; with : use Inline C => q{ and END_C with }; then got through. However there is still a problem: This innvocation of Inline requires the Parse::RecDescent module. Can't locate Parse/RecDescent.pm in @INC (@INC contains: D:\temp\java\_Inline\li b D:/Perl/site/lib D:/Perl/lib .) at D:/Perl/site/lib/Inline/C/ParseRecDescent.p m line 14. at D:/Perl/site/lib/Inline/C.pm line 322 BEGIN failed--compilation aborted at Hello2.pl line 5. and When I run other program, alway met this problem.Could anyone kindly help me? |
Re: FAQ: Can't find string terminator "EOF" anywhere before EOF at... | [ Reply ] [ Back to Index ] Top Bottom |
Author : Mark Baker Date: 2009/11/22 20:17
You have to get the module "RecDescent.pm" Activestate makes this very easy with its perl package Manager where you can search for modules that you dont have and install them. |
Reply | [ Back to Index ] Top Bottom |