Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Can @_ be extended?

by saskaqueer (Friar)
on Feb 11, 2005 at 04:09 UTC ( [id://429986]=note: print w/replies, xml ) Need Help??


in reply to Can @_ be extended?

As Fletch suggested, a prototype will work in this situation:

#!/usr/bin/perl -w use strict; sub setmode ($\@) { my $val = shift; splice(@{$_[0]}, 1, 0, $val); } my @a = qw(one two three); print join($/, @a), "$/__________$/"; setmode('add_test', @a); print join($/, @a), $/; __END__ result: one two three __________ one add_test two three

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found