| [reply] [Watch: Dir/Any] [d/l] [select] |
The reason is because say is not (yet) a built-in function. You have to import the function into your namespace first, hence use feature 'say';
Alternatively, you can just use print, which does not implicitly add the new line for you like say does.
print "$_\n" for $line1 =~ /[$line2]/g;
You can also add the -l (dash elle) modifier to your "shebang" line which essentially makes print behave like say:
#!/path/to/perl -l
...
print for $line1 =~ /[$line2]/g;
Hope this helps!
| [reply] [Watch: Dir/Any] [d/l] [select] |
| [reply] [Watch: Dir/Any] [d/l] [select] |
| [reply] [Watch: Dir/Any] [d/l] [select] |