mencari bantuan perl. Saya tidak pandai dengan regex. Namun pada dasarnya inilah bantuan yang saya perlukan:
-strip out the leading blank line
-regex for any value after the directory `/foo/bar/set`, excluding trailing spaces
Hasil yang diharapkan:
55
proxy
test.event.done
File masukan uji:
<leading blank :line here>
/foo/bar/set/55
/foo/bar/set/proxy
/foo/bar/set/test.event.done
Kode:
while(my $line=<>) {
chomp($line);
if ($line =~ m#foo/bar/set/(not sure what to match here) {
print "$line\n";
}
}
\S+
? - person tchrist   schedule 09.04.2011