Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: perl is better?



On Sat, 4 Apr 1998, Jim Schweizer wrote:

> Hi all,
> 
> When you request majordomo to send a tlug monthly archive file
> it arrives with a pesky >From line that MHonARC ignores (meaning
> it thinks there are no new files to read because the line starts
> with a >)
> 
> Being lazy (and knowing sed better than perl) I got rid of them
> with 
> 
> $ cat tlug.9802 | sed 's/^>From/From/' > tlug.9802.s
> 
> But later, I decided to try the same thing with perl and
> couldn't get it to work. So I put the sed script in a file and:
> 
>     s/^>From/From/;


Perl's very picky about what it considers 'operator characters'.  Try
using this line instead:

s/^\>From/From/;

ie, backslashify the >.


sed2perl doesn't create the most beautiful output, does it? :)

--------------------------------------------------
Scott M. Stone <sstone@example.com, sstone@example.com>
               <sstone@example.com>
Linux Developer/Systems Administrator for Pacific HiTech, Inc. 
http://www.pht.com		http://armadillo.pht.co.jp
http://www.pht.co.jp	        http://www.turbolinux.com


---------------------------------------------------------------
Next TLUG Meeting: 11 April Sat, Tokyo Station Yaesu gate 12:30
Featuring Tague Griffith of Netscape i18n talking on source code
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links