All,

For this:

#! /usr/bin/perl -w
# file: stein_test_DBI_table.pl

use strict;
use Tie::DBI ();

my $DB_NAME = 'test_www';
my $DB_HOST = 'localhost';

my %test_users = (
    'root'    => [qw(user,authors,admin 5 superman)],
    'george'  => [qw(users 3 jetson)],
    'winnie'  => [qw(user,authors,devel 3 thepooh)],
    'andrew'  => [qw(users 2 llama23)],
    'fred'    => [qw(users,devel 2 bisquet)],
    'morgana' => [qw(users 1 lafey)]
);

# Sometimes it's easier to invoke a subshell for simple things than to
# use the DBI interface.
open MYSQL, "|mysql -h $DB_HOST -f $DB_NAME" or die $!;
print MYSQL <<END
    DROP TABLE user_info;
CREATE TABLE user_info (
                        user_name char(20) primary key,
                        passwd char(13) not null,
                        level tinyint not null,
                        groups char(100)
                        );
END
    close MYSQL;


I get this:

[EMAIL PROTECTED] Apache]$perl -wc stein_test_DBI_table.pl
Possible attempt to separate words with commas at stein_test_DBI_table.pl
line 11.
Possible attempt to separate words with commas at stein_test_DBI_table.pl
line 11.
Possible attempt to separate words with commas at stein_test_DBI_table.pl
line 13.
Possible attempt to separate words with commas at stein_test_DBI_table.pl
line 13.
Possible attempt to separate words with commas at stein_test_DBI_table.pl
line 15.
syntax error at stein_test_DBI_table.pl line 31, near "close"
  (Might be a runaway multi-line << string starting on line 22)
stein_test_DBI_table.pl had compilation errors.

Can anyone see my error?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to