in reply to Fighting sub foo($;$$)
Why don't you just remove the prototype?
use v5.12.0; use warnings; package Somename; use Data::Dump qw/pp dd/; foo(1,2,3,4,5); sub foo { my $one = shift; my $two = shift; my $three = shift; my $four = shift; my $five = shift; pp $four,$five; }
(4, 5)
FWIW: your old code produced a warning that you apparently ignored in the past°
Somename::foo() called too early to check prototype at d:/Perl/pm/foo_prototype.pl line 8.
removing the protoytpe will help you getting rid of this too.
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
°) or you didn't use warnings
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fighting sub foo($;$$)
by haukex (Archbishop) on Apr 14, 2023 at 20:53 UTC | |
by LanX (Saint) on Apr 14, 2023 at 21:47 UTC |