#!/usr/bin/perl -w open(SOURCE, "30.txt") || die "Cannot open: $!"; open(FILE2SEARCH, "searchfile.txt") || die "Cannot open: $!"; @sfile=; close(FILE2SEARCH); while () { $script = ; chomp $script;

the next line is where my problem begins. I have warning on, but I get no errors.

@line=grep( /$script/, @sfile ); } close(SOURCE); open(DEST, ">>newfile.txt") or die "Can't open new.cfg: $!"; print DEST @line; close(DEST);