Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Perl Errors

Name: Anonymous 2008-02-26 0:19

I've just switched from PHP to Perl (using mod_perl for my sever) and I need help converting a script.

Here's the selection of code that's causing an error;

if (!$Database = DBI->connect('DBI:mysql:' . DB_NAME, DB_USER, DB_PASSWORD) || !$Results = $Database->prepare('SELECT ID, Title FROM Comics ORDER BY ID ASC') || !$Results->execute; )
{
        my $Error = 'DB';
        print 'Status: 500' . "\n";
}

Perl gives me this error message;

Can't modify logical or (||) in scalar assignment at test.pl line 25, near "->execute;"
syntax error at test.pl line 25, near "->execute;"
Execution of test.pl aborted due to compilation errors.

Anyone know what's wrong?

Thanks to any help.

Name: Anonymous 2008-02-26 0:24

The problem is that your code is complete shit.

Name: Anonymous 2008-02-26 0:25

I've just switched from Perl to typing random punctuation and I need help converting a script.

Here's the selection of code that's causing an error;

@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print

Perl gives me no error message;

Anyone know how I can make it wrong?

Thanks to any helpu.

Name: Anonymous 2008-02-26 0:36

>>2
How so?

Name: Anonymous 2008-02-26 1:12

Well, the last error was fixed because of an ';' after 'execute'. I'm not sure about the top one.

Name: Anonymous 2008-02-26 1:30

Don't panic guys. I managed to get it working.

Required brackets before and after each statement in the loop. I've got to get used to this new syntax.

Name: Anonymous 2010-11-02 12:54

Name: Anonymous 2010-11-25 8:18

Name: Anonymous 2011-02-03 1:05

Name: Anonymous 2011-02-18 13:39

<-- check my doublesNewer Posts
Don't change these.
Name: Email:
Entire Thread Thread List