in reply to Can @_ be extended?
Is this magic enough for you?
#!/usr/bin/perl -w # test.pl -- use strict; use warnings; use diagnostics; my @a = qw( one two three ); print join( "\n", @a ), "\n__________\n"; setmode( 'add_test', \@a ); print join( "\n", @a ); sub setmode { my $val = shift; splice( @{$_[0]}, 1, 0, $val ); }
|
|---|