On Thursday 01 July 2004 18:59, David Arnold wrote:
>
> All,
Hello,
> 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
^
You forgot the semicolon at the end of the line.
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;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>