Help for this page

Select Code to Download


  1. or download this
    my @all  = 1..10;
    my @some = 1..5;
    ...
    # Elements that do not exist in @some array
    exists($h{$_}) or push @c, $_ for @all;
    # @c: 6 7 8 9 10
    
  2. or download this
    my $string = 'string';
    
    ...
    # false:
    $string !~ /^string$/ and print "$string is not string?\n";
    # STDOUT: string is really string