while (<SOURCE>) { $script = <SOURCE>;
This ignores every second line in 30.txt, because it reads one item from SOURCE and assigns it to $_, and then another one and assigns it to $script. If that's not what you want, write while (my $script = <SOURCE>) { ... } or so instead.
It might also help if you gave us a little example of a few inputs, and what output you expect from them.
In reply to Re: Perlwanab grep array elements against another array
by moritz
in thread Perlwanab grep array elemetns against another array
by Perlwanab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |