In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote: > In article <[EMAIL PROTECTED]>, Raghu Murthy wrote: > >> I need to remove ./ and #from a list of files. I can do it in sed but I >> am not able to use it in my perl script. I tried to do something like >> this >> >> chomp ($txtlist = <STDIN>); >> qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a # >> qx' sed -e"s?\([ /]\)\./?\1?g" $txtlist; # To remove lines starting with >> a ./ >> >> I can do it if i hard code the file name but if i try to use $txtlist it >> does not work. What am i doing wrong.
Thinking that I misunderstood the question... $txtlist is the file you want to edit? If you call the script so: ./strip_chars txtlistfile > new_version then you would start the code I posted with "while (<>) {" instead. -- Kevin Pfeiffer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]