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?

If you know in advance the array index then use splice.

splice @{$compilers{'system2'}}, 1, 1;

If you have to delete based on the value then you should probably use
grep.

@{$compilers{'system2'}} = grep $_ ne 'compiler_c',
@{$compilers{'system2'}};



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to