snape has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I think my question may be stupid but I don't know why I am not able to do it. I am trying to add tab spaces between each characters by using substitute command and it doesn't seem to work properly.
Code Snippet:
#!/usr/bin/perl use strict; use warnings; my $bar1 = 'this002haa007hoothat'; my $bar2 = 'abcdef'; my $bar3 = $bar1.$bar2; $bar3 =~ s/\t$//g; print $barb, "\n";
Can you explain where I am doing a blunder ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Substitute: for having tabs between the characters
by almut (Canon) on Apr 13, 2010 at 05:42 UTC | |
by snape (Pilgrim) on Apr 13, 2010 at 21:20 UTC | |
by GrandFather (Saint) on Apr 13, 2010 at 23:17 UTC | |
|
Re: Substitute: for having tabs between the characters
by CountZero (Bishop) on Apr 13, 2010 at 06:05 UTC | |
|
Re: Substitute: for having tabs between the characters
by Marshall (Canon) on Apr 13, 2010 at 07:35 UTC | |
by snape (Pilgrim) on Apr 13, 2010 at 21:18 UTC | |
by Marshall (Canon) on Apr 13, 2010 at 23:22 UTC |