P
pod69
Hello
I am a little bit confused now ? Whats wrong here?
#!/usr/bin/perl
my @bla = ("sdf","sdf","sdf");
print scalar(@bla);
create(@bla);
sub create{
my @arg = shift;
print scalar(@arg);
foreach my $b(@arg){
print "yes";
}
}
In the function the array conists of one element but where are the
other two?
How can I give a function the whole array?
thx
I am a little bit confused now ? Whats wrong here?
#!/usr/bin/perl
my @bla = ("sdf","sdf","sdf");
print scalar(@bla);
create(@bla);
sub create{
my @arg = shift;
print scalar(@arg);
foreach my $b(@arg){
print "yes";
}
}
In the function the array conists of one element but where are the
other two?
How can I give a function the whole array?
thx