Re: Deleting # and other characters

2003-11-06 Thread Dan Anderson
> > 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 # delete all .s and /s $variable_to_remove_from =~ tr/\.\///d; # remove the first ./ and anything before it from # $variable_to_remove_from if

Re: Deleting # and other characters

2003-11-06 Thread John W. Krahn
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 = ); > qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a # > qx' sed -e"s?\([ /]\)\./?\1?g

Re: Deleting # and other characters

2003-10-23 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Raghu Murthy wrote: > I tried doing the following > > next if s?\([ /]\)\./?\1?g; That looks to me more like sed (as best I can tell) and not Perl. > For some reason it is not removing the ./ from the file. Any suggestions > are welcome. > The file is in this fo

Re: Deleting # and other characters

2003-10-23 Thread Raghu Murthy
I tried doing the following next if s?\([ /]\)\./?\1?g; For some reason it is not removing the ./ from the file. Any suggestions are welcome. The file is in this format a b ./dsfj/dfl/dksl ./ksdfl/dsld c d ./sds/dsl/dksld ./kdf/ksd/ksdk Thanks Raghu In article <[EMA

Deleting # and other characters

2003-10-23 Thread Raghu Murthy
I tried using next if s?\([ /]\)\./?\1?g; and it did not work. The file looks like this a b ./zyc/dfdk ./dkld/kdj k l ./ksdk/ksk/ksd./kskd/kdsk Thanks _ Never get a busy signal because you are always connected with high

Re: Deleting # and other characters

2003-10-22 Thread Kevin Pfeiffer
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 = ); >>

Re: Deleting # and other characters

2003-10-22 Thread Kevin Pfeiffer
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 = ); > qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a # >

Deleting # and other characters

2003-10-22 Thread Raghu Murthy
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 = ); qx' sed -e "/^#/d $txtlist'; # To remove lines starting with a # qx' sed -e"s?\([ /]\)\./?\1?g" $txtlist; # To remove lines star