| buubot | Randal: 5 |
| rindolf | Skeets: hi. |
| Jo-W | I didnt had the error before, i changed something, now I have it about 14 times |
| Skeets | rindolf: within the sub routines i put my $code = <<"END"; and then the Code...... and then END |
| Randal | eval: use strict; use warnings; if ($_) { my $x = 3; } else { my $x = 5; } |
| buubot | Randal: 3 |
| Randal | eval: use strict; use warnings; if (not $_) { my $x = 3; } else { my $x = 5; } |
| buubot | Randal: 5 |
| Randal | hmm. not because of constant optimization |
| Skeets | rindolf: now this is what happens tot he page: http://skeets.kicks-ass.net/cgi-bin/new.cgi |
| Randal | both "cgi-bin" and ".cgi" |
| rindolf | Skeets: can you nopaste your code? And syntax highlight it. |
| Jo-W | this bug is driving me insane |
| Randal | belt *and* suspenders |
| action | Randal rolls eyes |
| Randal | rolls eyes |
| Skeets | rindolf: http://rafb.net/p/M5E32R16.html |
| Caelum | eval: $^W=1; my $foo = "bar"; my $foo = "baz"; |
| buubot | Caelum: baz |
| Randal | odd. shouldn't that be an error? waring? warning too? :) |
| wolverian | yes, it should. |
| Randal | oh good, the perlcast news is out! "your roving perl reporter" |
| rindolf | Skeets: instead of the print starting on line 32 you should use a here-doc. |
| Skeets | rindolf: what's a here-doc |
| Caelum | eval: use warnings; my $foo = "bar"; my $foo = "baz"; |
| buubot | Caelum: baz "my" variable $foo masks earlier declaration in same scope at eval line 1. |
| rindolf | Skeets: in sub page_header - you declare a variable but then use it. |
| Caelum | ahh, changing $^W happens only at runtime... |
| rindolf | Skeets: a here document or here-doc for short is that <<"EOF"..EOF thing |
| Randal | eval: BEGIN { $^W = 1 } my $x; my $x |
| rindolf | Skeets: in sub page_header - you declare a variable but you don't use it for anything. |
| buubot | Randal: "my" variable $x masks earlier declaration in same scope at eval line 2. |
| Randal | aha! aka "use warnings" :) |
| Skeets | rindolf: in page_header i declare a variable and use it, yea, is that wrong? |
| rindolf | Skeets: you're not using it. Skeets: you just declare it. my $code = <<"END"; |