kingram has asked for the wisdom of the Perl Monks concerning the following question:
The $sql may have two arguments on an update, but 6 on an insert, therefore I want to make sure that the references get placed accordingly to do the $dbh->prepare() and execute(). Using print statements@params = ($sql,$_[0],$_[1]); dbAction(@params); sub dbAction(\@){ print Dumper(@_); print Dumper(\@_); }
I can see that the data is there, but I want to use a for loop to make sure how many items are being passed in to the sub, and I get -1 when I ask for $#{@_}.print "$_[0]\n"; print "$_[1]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dumper Won't print @_ ?
by Anonymous Monk on Jul 30, 2012 at 06:30 UTC | |
|
Re: Dumper Won't print @_ ?
by kingram (Acolyte) on Jul 30, 2012 at 07:04 UTC | |
|
Re: Dumper Won't print @_ ?
by Marshall (Canon) on Jul 30, 2012 at 07:16 UTC | |
|
Re: Dumper Won't print @_ ?
by Athanasius (Archbishop) on Jul 30, 2012 at 06:35 UTC | |
by AnomalousMonk (Archbishop) on Jul 30, 2012 at 14:03 UTC |