Forum Discussion
Don_Munyak
Dec 30, 2009Nimbostratus
Posted By hwidjaja on 12/28/2009 10:26 AM
!/usr/bin/perl
use strict;
my ($File, $Pattern) = @ARGV;
my $buf;
open (fh, $File) || die "Cant open $File";
{
local $/;
$buf=;
}
close (fh);
while ($buf =~ /([^\n]*\{[^\{]*$Pattern[^\}]*\})/sg){
print "$1\n---\n";
}
Quick question...
For $buf=; ... is correct... or should it be (fh) ??
Thanks again
--Don