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.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List