JAaronAnderson.com wrote:
Ok, thanks guys for posting, I am posting from within my GoogleGroup
Account.
Ergo my comment...
let's not be critical and get down to the code!
the code I was asking about was ::
map { $_ = $$_[0] } @userlist;
I dont understand it fully but I got what I wanted to get done with
the following::.
my @mirapointMatrix = $obj->command_ok(qw/user list/, "","","");
my @accountIndex = map { $_ = $$_[0] } @mirapointMatrix;
You are converting @mirapointMatrix from an Array Of Arrays to an array
and assigning those values to @accountIndex.
$ perl -le'
use Data::Dumper; $Data::Dumper::Indent = 0; $Data::Dumper::Terse = 1;
my @mirapointMatrix = ( [ "a".."d" ], [ "e".."h" ], [ "i".."l" ], [
"m".."p" ] );
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
my @accountIndex = map { $_ = $$_[0] } @mirapointMatrix;
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
'
@mirapointMatrix =
[['a','b','c','d'],['e','f','g','h'],['i','j','k','l'],['m','n','o','p']]
@mirapointMatrix = ['a','e','i','m']
@accountIndex = ['a','e','i','m']
BTW $$_[0] is usually written as $_->[0].
foreach (@accountIndex)
{
my $capturedHandle = "$_";
perldoc -q "What.s wrong with always quoting .$vars."
my $quota = $obj->command(qw/quota get storage /, "user.
$capturedHandle", );
my @fullQuota = split(/ /,$quota); #split result on special spaced
chars
What do you mean by "special spaced chars"? The regular expression
pattern you are using will split on a single space character (like the
one between all the words in this sentence.)
if ( $fullQuota[1] == 0 )
{
my @accountPOC = $obj->command(qw/user list/,
"$capturedHandle","","");
my @accountOwner = map { $_ = $$_[1] } @accountPOC;
$ perl -le'
use Data::Dumper; $Data::Dumper::Indent = 0; $Data::Dumper::Terse = 1;
my @accountPOC = ( [ "a".."d" ], [ "e".."h" ], [ "i".."l" ], [ "m".."p" ] );
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
my @accountOwner = map { $_ = $$_[1] } @accountPOC;
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
print "[EMAIL PROTECTED] = ", Dumper [EMAIL PROTECTED];
'
@accountPOC =
[['a','b','c','d'],['e','f','g','h'],['i','j','k','l'],['m','n','o','p']]
@accountPOC = ['b','f','j','n']
@accountOwner = ['b','f','j','n']
print "Email address :: $capturedHandle has an $fullQuota[1] active
quota.\n";
print "The above analyzed account is owned by $accountOwner[0]\n";
print "total email activity for this account is :: $quota\n\n";
}
}
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/