Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think you are right: It's silly to execute this shell pipeline in a perl script.
And the way you do it is even worse. If you want to put a complex shell command in a script, use a shell script, that's what it was made for. If you just want to execute a shell command in a perl script, use the system command. Unless you need the output of the command, then use backticks. Here is an example of a shell script doing the same as your perl script, but with much less resources:
Update: I forgot to mention that your script will probably fail. The third parameter (*.html) will be expanded by the shell, so perl will have the first filename in $ARGV2 and not the glob. Therefore I changed the usage to have the third parameter quoted.
In reply to Re: Re: RE: Replace across files (extreme newbie)
by busunsl
|
|