Sophia Corwell wrote:
> Sorry about that...
>
> Here is an example:
>
> Here is what my hash looks like:
>
> %compilers = (
> system1 => ['compiler_a'],
> system2 => ['compiler_b',
> 'compiler_c','compiler_d'],
> system3 => ['compiler_e'],
> );
>
> Now, if I want to delete just the 'compiler_c' value
> from the system2 key, can I use the delete function or
> the pop function?
have you try:
#!/usr/bin/perl -w
use strict;
my %compilers = (
system1 => ['compiler_a'],
system2 => ['compiler_b','compiler_c','compiler_d'],
system3 => ['compiler_e'],
);
splice(@{$compilers{system2}},1,1);
while(my($key,$ref) = each %compilers){
print "$key: @{$ref}\n";
}
__END__
prints:
system2: compiler_b compiler_d
system1: compiler_a
system3: compiler_e
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]