On Friday, May 17, 2002, at 01:41 , [EMAIL PROTECTED] wrote:

>   # Build the value string 'eric','34','555-1212'
>   foreach ($age $name $phone) {
>       $values .= $dbh->quote($_) . ',';
>   }
>   # Remove the extra comma at the end
>   chop $values;
>
>   $dbh->do(INSERT INTO $dbfile ($column_names) VALUES ($values));

if you want to be wayDrok try

        my @list = my ($name, $phone, $reality) = qw/drieux ring what/;

        print "We have $_ \n" foreach(@list);

The question of data structure selection really is the space
you want to be thinking about....

note that the above gives you four variables - or
you could toss out the intermediary grouping... and
go with say

        use constant NAME=> 0;
        use constant PHONE =>1;
        use constant REALITY => 2;

        my @list = qw/drieux ring what/;
        print "$_ -> $list[$_]\n" foreach (NAME,PHONE,REALITY);

try it....

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to