Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Uninitialized value and a dot between $schema and $table

by stevieb (Canon)
on Aug 08, 2019 at 21:13 UTC ( [id://11104196]=note: print w/replies, xml ) Need Help??


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. ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104196]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found