- or download this
my $var;
if ($string =~ /$capture_regex/) {
$var = $1;
}
- or download this
my ($var) = $string =~ /$capture_regex/;
- or download this
next unless $string =~ /$capture_regex/;
my $var = $1;
- or download this
my $var;
if ($string =~ /$capture_regex/) {
...
# ... issue warning, make a log entry, or whatever ...
next;
}
- or download this
$ grep soft /usr/share/dict/words | wc -l
30
$ grep ^soft /usr/share/dict/words | wc -l
22
- or download this
/ \b (?: soft | softer | softest ) \b /ix
- or download this
#!/usr/bin/env perl
...
return \%corpus;
}
- or download this
{ "2017-09-01" => 4, "2017-09-03" => 6, "2017-09-04" => 12 }
- or download this
$count_for_date{$date} ||= 0;
- or download this
{ "2017-09-01" => 4, "2017-09-02" => 0, "2017-09-03" => 6, "2017-09-04
+" => 12 }