For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > September 2006 > bad magic









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author bad magic
Dometz

2006-09-26, 6:57 pm

Hi,

I am trying to compile a perl script that I have written. Unfortunately
I get the following error:

% perlcc -o log -B log.pl
% ./log -h
Invalid bytecode for this architecture: bad magic (want 0x43424c50, got
0x7f7) at ./log line 2.

Now, if I change a print message in my code from:
print "foo\n";
to:
print 'foo\n';

Any ideas of how to fix this?

thanks

dometz

PS:
% perlcc -h
perlcc compiler frontend, version 2.04

nobull67@gmail.com

2006-09-27, 6:59 pm

Dometz wrote:

> I am trying to compile a perl script that I have written. Unfortunately
> I get the following error:
>
> % perlcc -o log -B log.pl


What are you hoping to achieve by doing this?

Perl bytecode precompliation support in Perl5 was never much use.

Dometz

2006-09-29, 6:57 pm

I need to improve performance / speed.

dometz


nobull67@gmail.com wrote:
> Dometz wrote:
>
>
> What are you hoping to achieve by doing this?
>
> Perl bytecode precompliation support in Perl5 was never much use.


Paul Lalli

2006-09-29, 6:57 pm

Dometz wrote:
> I need to improve performance / speed.


Improve your code and algorithms. Resorting to byte-code optimization
should be an absolute last resort.

Paul Lalli

Dometz

2006-09-29, 6:57 pm

Yeah, I already did that but, IN ADDITION, I want to create an
executable so that the source code doesnt need to be interpreted for
each call.

dometz


Paul Lalli wrote:
> Dometz wrote:
>
> Improve your code and algorithms. Resorting to byte-code optimization
> should be an absolute last resort.
>
> Paul Lalli


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com