Hi,

I'm trying to read from a file and based on the some of the matched info,
print out certain statements. This is probably very easy for the folks here.



open(FILE, "< obj.list")  or die "can't open file : $! " ;
open(NEW, "> new.list");


chomp(@lines = <FILE>);

foreach my $item (@lines) {
        if (/ADB/) {
        print "grant select , update, delete, insert on "  $item  " user;"
;
        print " grant select on " $item " to tcmesg_select ;" ;
        if (/p_/) {
        print " grant execute on " $item" to tcmesg_admin; " ;
                }
}

close(FILE);

close(NEW);


Thanks ahead,
Synh

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to