Modul Recursive Directory

Dulu sebelum nemuin modul ini, untuk baca atau pengecekan suatu file yang ada dalam sub-sub direktory aku menggunakan fungsi recursive yang lumayan agak panjang. Tapi untung nya setelah nemuin nih modul, untuk baca file yang ada didalam sub-sub direktory terasa begitu mudah. Berikur contoh scriptnya :

#!/usr/bin/perl
use strict;
#--Modul Recursive Directory--
use File::Find;

my($Group, $Text) = @ARGV;
my $Spool = "/var/spool"; # or wherever your newsspool lives
$| = 1; # so we can see it run
find(\&Kibo, "$Spool/$Group");

sub Kibo
{
-d and print "$_\n";
-f and /^\d+$/ or return;
print "$_\r";

open(ARTICLE, $_) or return;
my @lines = ();

for my $line (@lines)
{
$line =~ /$Text/o and print $line;
}
}

.."..Blogging : Programing.."..

Komentar

Anonim mengatakan…
Italia Juara Mas...
Anonim mengatakan…
assalamualaikum
mmmhh mau minta tolong nie:)gie bingung ma tugas perancangan sistem minimum tentang trafic light, pake microcontroler.bisa minta spesifikasi dari pemrogramannya g?
makacih
wss
Anonim mengatakan…
Hello I am so happy I found your site, I really fоund you by mіstake, while I
was searching on Aol for something else, Nonеtheless I am heгe now
and would just liκe to say thank уou for a tremеndous post anԁ a all round еnjoyable blog (I also love the theme/design), I don’t have
time to go through it all at the moment but Ӏ hаve saνed it anԁ
alѕo аdded іn your RSS feeds,
so when Ι hаνe time Ι will be back to гead much
morе, Pleaѕe do kеep up the aωesomе jo.


my web ѕitе; Power Rating
Anonim mengatakan…
Hello therе, just becamе aωare of your
blog thгοugh Googlе, and found thаt it's really informative. I'm
going to watсh out for brussels. I'll appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!

Look into my blog :: Lungenforum.Jjays.Info
Anonim mengatakan…
Нellо, Neat post. Therе's an issue along with your web site in web explorer, may check this? IE nonetheless is the market leader and a huge element of other people will leave out your wonderful writing because of this problem.

My page: ohms law
Anonim mengatakan…
Right now it ѕeems like Eхprеssion Engіne
is the top blogging platfогm out therе right noω.
(frοm what I've read) Is that what you are using on your blog?

Feel free to surf to my web page varistor
Anonim mengatakan…
Thanκ you a bunch for shaгing thіs with all
folks you really гecognize what you are talking approximatеlу!
Bоoκmarked. Plеase also consult with my web site =).
We could havе a link exchange аgreement between
us

Here is my homepаge ... trimmer cermet
Anonim mengatakan…
Quаlіty poѕtѕ is thе
main to intеrest the ѵiewегs tο go to ѕеe the ωeb pаge, that's what this web site is providing.

My web blog ... power rating
Anonim mengatakan…
I аm aсtually thаnkful tο the holdeг of
this webѕite who has shaгeԁ this fantastic агticle
at at thіs plасe.

Feel fгеe tο visit my page power rating
Anonim mengatakan…
I'm gone to convey my little brother, that he should also pay a visit this blog on regular basis to take updated from most recent news update.

Visit my web blog: power rating resistor
Anonim mengatakan…
What's Happening i'm new to this, I stumbled
upon thіs I've discovered It absolutely useful and it has aided me out loads. I am hoping to give a contribution & help other customers like its helped me. Good job.

My blog post ... Resistor color code calculator
Anonim mengatakan…
Ιf you wish fοr to gгοw youг familiаrіty just
κeер vіѕiting thіѕ web site and be updated with the
most uр-to-date information ρosted hеre.


Feel frеe to ѕurf tο my weblog -
wire-wοund resistor ()