CodeExplorer 2,996 Posted January 15 Perl error having gen-kernel.pl file and this declaration: my $code = ""; ... my $output = shift; open STDOUT,">$output" or die "can't open $output: $!"; $code .= <<EOF; ; finalize the computation of A,B,C,D iadd r0, r0, r23 iadd r1, r1, r24 iadd r2, r2, r25 iadd r3, r3, r26 ; compute x,y (x = A; y = C - D) mov r21, r0 iadd r22, r2, r3_neg(xyzw) ; decrement loop counter iadd r4.x, r4.x, l100.y endloop umul r5.x, vaTid.x, l100.w mov g[r5.x+2], r21 mov g[r5.x+3], r22 ; increment the 4 iteration counters iadd r5.y, l100.x, r4_neg(x).x iadd g[r5.x+4], g[r5.x+4], r5.yyyy end \x00 EOF print $code; The error is this: Use of uninitialized value value in concatenation (.) or string at gen-kernel.pl line 219. How to fix the error, sorry but I am null at Perl programming! Share this post Link to post Share on other sites
tiberius07 0 Posted January 15 It works for me. Does line 219 refer to the one with $code .= <<EOF;? Maybe the problem stems from the part where you denoted as ... Share this post Link to post Share on other sites
CodeExplorer 2,996 Posted January 16 my $output = shift; open STDOUT,">$output" or die "can't open $output: $!"; $code .= <<EOF; Use of uninitialized value value $output in concatenation (.) or string at gen-kernel.pl line 219. line 219 is "open STDOUT,">$output" or die "can't open $output: $!";" My guess now is that the error is at the line: my $output = shift; I've read a tutorial: https://perlmaven.com/shift https://www.perlmonks.org/?node_id=88222 and yeah shift is empty! But also shift contains program parameters, so perl.exe gen-kernel.pl kernel.il will do the trick! Share this post Link to post Share on other sites