my $lnxsrvrs = "@mylnxsrvrs";
This will assign to $lnxsrvrs the number of elements of the @mylnxsrvrs array.
Actually, it won't.
Since @mylnxsrvrs is in double quotes, the contents of the array are concatenated and stringified, and this string is assigned to $lnxsrvrs.
Consider:
my @array = ( qw/ un deux trois / ); my $count = "@array"; print $count;
Output:
un deux troisHow the OP (thinks they) got an output of 1 remains a mystery...
In reply to Re^2: Trying to capture a value from a list of values
by Not_a_Number
in thread Trying to capture a value from a list of values
by parthodas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |