Randy W. Sims writes: > On 12/20/2003 2:37 AM, [EMAIL PROTECTED] wrote: > > > Hi, > > > > I want to search for the word "status" in a group of files in a > > directory and replace it with "status\n^L" where ^L is a page break > > chatacter, In vi I can type it in using cntrl+l. > > > > I want to do this by > > > > perl -p -i.old -e 's/^STATUS$/STATUS\n(page break character)/' * > > > > How can I "write" the page break character (^L) on command line? > > > > Isn't page break ascii 11, i.e. hex x0B?
No, its decimal 12, or 0x0c > Try (after a backup): > > perl -p -i.old -e 's/^STATUS$/STATUS\n\x0B/' * perl -p -i.old -e 's/^STATUS$/STATUS\n\x0c/' * this is correct ----------^ > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>