Mathew Snyder wrote:
Chad Kemp wrote:
Mathew,
try to test every condition going INTO the hash (or hashes) before
you actually assign a value to a key. as mentioned earlier, hashes must
be key/value pairs. the key will auto-vivify if a key is "new" but only
if a corresponding value accom
Chad Kemp wrote:
> Mathew,
>
>try to test every condition going INTO the hash (or hashes) before
> you actually assign a value to a key. as mentioned earlier, hashes must
> be key/value pairs. the key will auto-vivify if a key is "new" but only
> if a corresponding value accompanies it. whe
Mathew,
try to test every condition going INTO the hash (or hashes) before
you actually assign a value to a key. as mentioned earlier, hashes must
be key/value pairs. the key will auto-vivify if a key is "new" but only
if a corresponding value accompanies it. when you assign values to a
Rob Dixon wrote:
> It's very unclear what you're trying to do, and what your RT package
> does. Let
> me make some observations and guesses and you can tell me where I'm
> right or
> wrong.
>
> $tix is an iterator that will return a sequence of tickets through the Next
> method.
>
> $ticket is a
On 3/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
snip
I'm under the impression that by assigning a single value to a hash it becomes
the key with the value being null.
snip
Perl will let you do it, but it is not a good idea and almost
certainly is not what you want to do.
snip
I did as yo
Mathew Snyder wrote:
Rob Dixon wrote:
Mathew Snyder wrote:
I have a problem printing out a hash. This is the script I'm working
with:
[snip old code]
When I print the hash all I get is a reference. I can't seem to
figure out how to get the actual contents. I've tried using \$,
%$, %{
Chas Owens wrote:
> On 3/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> my %customer = ${customer};
> snip
>
> Hashes cannot be created with only one value, they must always be in
> pairs: key and value. If $customer has a type of HASH (you can put
>
> print ref($customer), "
On 3/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
snip
my %customer = ${customer};
snip
Hashes cannot be created with only one value, they must always be in
pairs: key and value. If $customer has a type of HASH (you can put
print ref($customer), "\n";
in the code to check this) t
Rob Dixon wrote:
> Mathew Snyder wrote:
>>
>> I have a problem printing out a hash. This is the script I'm working
>> with:
>> #!/usr/bin/perl
>>
>> use warnings;
>> use strict;
>> use lib '/usr/local/rt-3.6.3/lib';
>> use lib '/usr/local/rt-3.6.3/local/lib';
>> use RT;
>> use RT::Tickets;
>>
>> R
Chas Owens wrote:
> On 3/20/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> $timeworked =
>> $env{$transaction->Creator}{$transaction->TimeTaken};
> snip
>
>> From this line you can see that %env is a HoH (hash of hashes). This
> means that if you want to print it out you n
On 3/20/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
snip
$timeworked =
$env{$transaction->Creator}{$transaction->TimeTaken};
snip
From this line you can see that %env is a HoH (hash of hashes). This
means that if you want to print it out you need two loops: one for the
firs
Rob Dixon wrote:
> Mathew Snyder wrote:
>>
>> I have a problem printing out a hash. This is the script I'm working
>> with:
>> #!/usr/bin/perl
>>
>> use warnings;
>> use strict;
>> use lib '/usr/local/rt-3.6.3/lib';
>> use lib '/usr/local/rt-3.6.3/local/lib';
>> use RT;
>> use RT::Tickets;
>>
>> R
Mathew Snyder wrote:
I have a problem printing out a hash. This is the script I'm working with:
#!/usr/bin/perl
use warnings;
use strict;
use lib '/usr/local/rt-3.6.3/lib';
use lib '/usr/local/rt-3.6.3/local/lib';
use RT;
use RT::Tickets;
RT::LoadConfig();
RT::Init();
my $tix = new RT::Ticke
Jeff Pang wrote:
>> Jeff Pang wrote:
foreach my $key (keys %$env) {
print $key . " -> " . $env{$key} . "\n";
}
>>> Hello,
>>>
>>> For a quick look,the codes above may not work.
>>> Since $env is a hash reference,so you can't say $e
>
>Jeff Pang wrote:
>>>foreach my $key (keys %$env) {
>>>print $key . " -> " . $env{$key} . "\n";
>>>}
>>
>> Hello,
>>
>> For a quick look,the codes above may not work.
>> Since $env is a hash reference,so you can't say $env{$key} to access
Jeff Pang wrote:
>>foreach my $key (keys %$env) {
>>print $key . " -> " . $env{$key} . "\n";
>>}
>
> Hello,
>
> For a quick look,the codes above may not work.
> Since $env is a hash reference,so you can't say $env{$key} to access the
> hash
>foreach my $key (keys %$env) {
>print $key . " -> " . $env{$key} . "\n";
>}
Hello,
For a quick look,the codes above may not work.
Since $env is a hash reference,so you can't say $env{$key} to access the hash's
value.
It may change to:
pr
Also, I've read the *perldsc* perldoc and it didn't help undo my confusion.
Mathew
Mathew Snyder wrote:
> I have a problem printing out a hash. This is the script I'm working with:
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use lib '/usr/local/rt-3.6.3/lib';
> use lib '/usr/local/rt-3.
Also, I've read the *perldsc* perldoc and it didn't help undo my confusion.
If we don't protect the freedom of speech, how will we know who the assholes
are?
http://theillien.blogspot.com
Mathew Snyder wrote:
> I have a problem printing out a hash. This is the script I'm working with:
> #!/usr/
19 matches
Mail list logo