Perl -p -i -e "s/search/replace/<extras>;" <FILENAME>
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 September 2008 15:06 To: beginners@perl.org Subject: Perl equivalent of "sed -f" or "awk -f" I'd like to apply a series of inline edits to a file in Perl. With sed, I could use "sed -f commandfile inputfile" or in awk, "awk - f commandfile inputfile", however, I could not find an equivalent in Perl. I'd prefer not to use sed or awk as they do not support inline editing directly. In Perl, what would be the way to apply a series of multiple inline edits in this form to an inputfile? commandfile: s/searchterm/replaceterm/ s/searchterm2/replaceterm2/ s/searchterm3/replaceterm3/ etc... Thanks in advance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ This e-mail is from the PA Group. For more information, see www.thepagroup.com. This e-mail may contain confidential information. Only the addressee is permitted to read, copy, distribute or otherwise use this email or any attachments. If you have received it in error, please contact the sender immediately. Any opinion expressed in this e-mail is personal to the sender and may not reflect the opinion of the PA Group. Any e-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business practices. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/