Re: aborted due Compilation error (!!??)
by chromatic (Archbishop) on May 04, 2012 at 05:21 UTC
|
Change line 112 from:
MainLoop;
... to:
MainLoop();
That may not fix all of the errors, but that will fix the error you mentioned. If you have other errors, you'll have to show the entire code and the verbatim error messages.
| [reply] [d/l] [select] |
|
Hi Mr chromatic,
I did Changed from
MainLoop;
... to:
MainLoop();
Then I called the program and, after enter, program didn't do any Action (cursor just went to next line)
franky@localhost myprog$ perl -w myperl60f.pl
franky@localhost myprog$
| [reply] [d/l] [select] |
|
| [reply] |
|
Re: aborted due Compilation error (!!??)
by NetWallah (Canon) on May 04, 2012 at 05:35 UTC
|
Welcome to the Monastery!
If you are intimidated by code changes, as suggested by chromatic, here is an alternative.
Add the following line BEFORE any line that gives you that syntax error:
no strict "subs";
Of course, this is NOT good/recommended programming practice, but, if you are a perl novice, it will help you get past the immediate issues, until you get more comfortable with code changes and "real" corrections.
P.S. You can use certain (limited) html markup, such as the <p> tag, to format your writeup. See Writeup Formatting Tips for details.
Update: Redacted - please see notes in my next post below..
I hope life isn't a big joke, because I don't get it.
-SNL
| [reply] [d/l] |
|
NetWallah, I'm curious...
If franky is intimidated by chromatic's suggested code change, why would they not be inimidated by your suggested code changes?
| [reply] |
|
| [reply] |
|
Hi Mr NetWallah,
also i Applied on line 16 your suggestion, I changed
use strict ; to : use no strict subs;
And i got a long message :
frankyy@localhost myprog$ perl -w myperl60f.pl
Can't locate no.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/5.10.1/i386-linux-thread-multi /usr/lib/perl5/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .) at myperl60f.pl line 16.
BEGIN failed--compilation aborted at myperl60f.pl line 16.
franky@localhost myprog$
- P.S
I used first Mr chromatic Sugesttion, then yours,and finally i applied both suggestion at once
| [reply] [d/l] |
|
My suggestion was "no strict "subs"" - it id not include the word "use".
If you want to disable "use strict", simply comment it out at the top of the code. (Insert "#" as the first character (without the quotes))
Also - it would help readers if you formatted your post using HTML paragraph markers: <p> and/or <br/>
I hope life isn't a big joke, because I don't get it.
-SNL
| [reply] |
|
|
|
|
|