> > 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
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
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
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
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
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 = );
>>
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 #
>
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