in reply to Building ARRAY with grep expression NOT working
Perl is less like the shell. See grep - it doesn't take grep command line options.
You likely want:
@ujs = grep { m![^/]*\.js! } @js;
Also, in Perl, it's customary to write regular expressions between // or as m!! (or any other character pair after m). Using strings as regular expressions works, but usually it's written as:
if($String =~ /[^\/]*\.js/ ) # or if($String =~ m![^/]*\.js! )
|
|---|