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


in reply to Uninitialized value and a dot between $schema and $table

# my ($dbh, $schema, $table, $cols_type) = @_; my $dbh = $_[0]; my $schema = "$_[1]"; my $table = "$_[2]"; my $cols_type = "$_[3]";

First, stop using the parameter array like this, use your first incantation: my (...) = @_; is how you'd do it with numerous parameters.

Second, I think I saw something in a previous post that stated to stop double-quoting things ("$_[3]") unnecessarily. Take that to heart.

Is there any chance you could state an entire use case of what you're trying to achieve in a single example, along with some input data? That'd help the Monks a lot.

...or is this something you're just fooling with? (This almost seems like deja-vu for some reason).

Replies are listed 'Best First'.
Re^2: Uninitialized value and a dot between $schema and $table
by tukusejssirs (Beadle) on Sep 18, 2019 at 18:46 UTC

    (1) I already try to use my (...) = @_; in my scripts. :)

    (2) I try to remember what I should/shouldn’t quote. I took it to heart, but it takes some time—I’m a slow learner. ;)

    (3) … entire use case … → I kind of can’t because it is a work in progress. I try to make it work by myself (and/or by searching the web), but when I cannot fix the errors/warnings by myself I come here to seek the Wisdom. ;)