Leser: 1
5 Einträge, 1 Seite |
@new = grep { /foo/ } @bar;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use strict;
use warnings;
my %websites = (
"http://www.perl-community.de" => 1,
"http://www.microsoft.de" => 1,
"http://www.perlmonks.org" => 1,
);
my $site1 = "http://www.perl-community.de";
my $site2 = "http://www.perl.de";
print "$site1: " . (exists $websites{$site1} ? "okay" : "forbidden") . "\n";
print "$site2: " . (exists $websites{$site2} ? "okay" : "forbidden") . "\n";
5 Einträge, 1 Seite |