http://qs1969.pair.com?node_id=1036252


in reply to regular expression trouble

You should study how objects and methods work in Perl. The sub should start with
my $self = shift;

The table is the second parameter, the first one is the invocant.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: regular expression trouble
by Crackers2 (Parson) on May 31, 2013 at 14:03 UTC

    In addition to that, this:

    my $sql="INSERT INTO $table ($values) VALUES ($names)\n";

    should probably be

    my $sql="INSERT INTO $table ($names) VALUES ($values)\n";