in reply to Assign valuse of array within array to variables
sub Testing { my ($VAR5,$VAR6,$VAR7,$VAR8) = @{$_[0]}; print "Var5: $VAR5\tVar6:$VAR6\tVar7: $VAR7\tVar8: $VAR8\n"; }
$_[0] is the first element of the array @_
$_ is something completely different
> main::Testing() called too early to check prototype at C:\temp\arr_refernce.pl line 11.
Do
sub Testing {
not
sub Testing (){
if you want to pass arguments.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assign valuse of array within array to variables
by g_speran (Scribe) on Feb 23, 2021 at 03:23 UTC |