Perl For You
Sunday, July 10, 2011
sending array as arguments
Perl Script
sub myfunc
{
my @a = @{shift()};
print "@a";
}
package main;
@aa=("hello","aaaaa");
&myfunc (\@aa);
Output:
G:\perl_programs>perl function_sendarray.pl
hello aaaaa
G:\perl_programs>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment