Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Basic Coding Tips: Parsimonious Parameterization

by wazoox (Prior)
on Jan 31, 2005 at 12:37 UTC ( #426569=note: print w/replies, xml ) Need Help??


in reply to Re^3: Basic Coding Tips: Parsimonious Parameterization
in thread Basic Coding Tips: Parsimonious Parameterization

Yes :) But it'd works this way:
sub array_merge(\@\@){ my($array1, $array2) = @_; foreach my $element (@$array2){ @$array1 = (@$array1, $element); }#foreach return @$array1; }#array_merge my @t=array_merge(@liste1, @liste2);

Replies are listed 'Best First'.
Re^5: Basic Coding Tips: Parsimonious Parameterization
by bart (Canon) on Jan 31, 2005 at 15:58 UTC
    my @t = (@liste1, @liste2);
    works too. No need to reinvent what the core language already provides in a simple way.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://426569]
help
Chatterbox?
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-12-06 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (116 votes). Check out past polls.