Help for this page

Select Code to Download


  1. or download this
    my $words = {
      'foo' => {
        named_property_x => 'nn',
    ...
    delete $words->{'baz'}->{'named_property_z'};
    # To check for a specific tag:
    if ( $words->{'baz'}->{'named_property_z'} eq 'nps' ) { ... }
    
  2. or download this
    my $words = {
      'foo' => {
        nn => 1,
    ...
    delete $words->{'baz'}->{'nps'};
    # To check for a specific tag:
    if ( $words->{'baz'}->{'nps'} ) { ... }
    
  3. or download this
    my $words = {
      'foo' => [ 'nn', 'nns' ],
      'bar' => [ 'nvbg', 'np' ],
    ...
    @{$words->{'baz'}} = grep { $_ ne 'nps' } @{$words->{'baz'}};
    # To check for a specific tag:
    if ( grep { $_ eq 'nps' } @{$words->{'baz'}} ) { ... }