#!/usr/bin/perl
use strict;
use warnings;
my @ar = ("rahul","patil");
my @ar1 = ("nitin");
my @ar4;
push @ar4, (@ar, @ar1);
print "@ar4";Cheers, Parag On Mon, Sep 20, 2010 at 12:49 AM, rahul patil <[email protected]> wrote: > Hello all, > > below is sample code i have written.Is it right way to declare ar4 which is > concatenation of ar and ar1 > > #!/usr/bin/perl > @ar = {"rahul","patil"}; > @ar1 = {"nitin"}; > @ar4 = {...@ar,@ar1}; > print @ar4[2]; > > if yes, why it is not printing output as nitin on my system > > -- > Regards, > Rahul Patil > -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
