LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   perl and linux commands (https://www.linuxquestions.org/questions/programming-9/perl-and-linux-commands-413276/)

Ammad 02-08-2006 11:15 PM

perl and linux commands
 
getting problem when i run compiled perl binary

#!/usr/bin/perl

print(`ls -l`);

when i run this using
root#perl first.pl
it works

as i compile
compile messages on prompt
pccdS4YP.c: In function 'perl_init_aaaaa':
pccdS4YP.c:1162: warning: this decimal constant is unsigned only in ISO C90
root#
root#./a.out
panic: invalid pad in pad_sv: 0x8eacb04[0x8eb9ab8] at o line 3.

whats the problem and how to resolve

taylor_venable 02-09-2006 08:43 PM

It sounds like your C compiler disagrees with the code that the Perl compiler generates. I tried this myself with Perl 5.8.7 and GCC 3.4.4 and it works, using just "perlcc test.pl" to generate the binary. It worked for me, so I think it's probably a Perl/CC dispute that might be fixed by switching versions. Check the "perlcompile" manpage for more info. What versions of Perl and your C compiler are you using?

rjcrews 02-09-2006 09:48 PM

I had a simiiar problem that I corrected by updating perl and the gcc compiler.

johnMG 02-11-2006 01:38 PM

Code:

my $foo = `ls -l`;
print $foo, "\n";



All times are GMT -5. The time now is 10:56 AM.