Running Perl from the shell will become quite complicated for more than simple scripts since the shell implements it's own filtering and scanning for things it might be interested in. You would need to toy alot with backslahes (escaping) In this case, the shell might be interested in the $ character, since it can mean alot of things in various shells. Since I don't know which shell you're using, I can't tell you. Solutions:
- Write the non-Perl variation: find /home/*|grep filename
- throw your script into a .pl file and run it (obvious answer)
- throw around some backslashes (maybe even for the backticks) until it works :o) I already see one potential problem- you are not properly encapsulating your mini-script with the appropriate shell metachars.
AgentM Systems nor Nasca Enterprises nor
Bone::Easy nor Macperl is responsible for the
comments made by
AgentM. Remember, you can build any logical system with NOR.