Joseph L. Casale wrote:

I  have a list:
@list = ('Exchange','Filter','DNS','Domain');
This is a list of arrays I also have of course to leverage this I am trying to 
. the @ symbol on it during use.

foreach $vm (@list) {
                my_sub("@" . "$vm");
                print "@" . "$vm\n";
}

The print likes this, but the my_sub doesn't? Why not?

What do you mean by 'likes'? As far as I can see both will work, but neither 
will
do what you expect of them.

The hash solution has been mentioned, but it may be more appropriate to use
array references without the containing hash:

foreach my $vm ([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL 
PROTECTED]) {
 my_sub(@$vm);
 print "@$vm\n";
}

(I am calling the reference $vm because you did and it presumably means
something to you, unlike the rest of the world :)

HTH,

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to