|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 463 (0x1cf)
Types: TextFile
Names: »fgrep.pl«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
└─⟦3da311d67⟧ »./cops/1.04/cops_104.tar.Z«
└─⟦6a2577110⟧
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
└─⟦6a2577110⟧ »./cops/1.04/cops_104.tar«
└─⟦this⟧ »cops_104/perl/fgrep.pl«
#
# Just a quick perl fgrep...
#
package fgrep;
sub main'fgrep {
local($file, @exprs) = @_;
local(@list);
if (open file) {
$code = "while (<file>) {\n\tchop;\n";
for (@exprs) {
$code .= "\tpush(\@list, \$_), next if m\201${_}\201;\n";
}
$code .= "}\n";
warn "fgrep code is $code" if $debug;
eval $code;
warn "fgrep @exprs $file: $@\n" if $@;
} elsif ($debug) {
warn "main'fgrep: can't open $file: $!\n";
}
@list;
}
1;