Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to replace Tab with spaces not altering postion

by petral (Curate)
on Oct 10, 2002 at 15:11 UTC ( #204199=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    > perldoc -q tabs
    Found in /usr/local/lib/perl5/5.6.1/pod/perlfaq4.pod
    ...
      @expanded_lines = expand(@lines_with_tabs);
    
    > 
    
  2. or download this
       Occasionally, you can't use just a `/g' to get all the changes to
       occur that you might want.  Here are two common cases:
    ...
          # expand tabs to 8-column spacing
          1 while s/\t+/' ' x (length($&)*8 - length($`)%8)/e;
    
  3. or download this
    
        print "\et" x ($tab/8), ' ' x ($tab%8);    # tab over
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://204199]
help
Chatterbox?
[shmem]: Corion: very clear case of missing sequence number
[Corion]: shmem: Yeah. I guess they have a sequence number but distribute the events across threads or machines or whatever.
[karlgoethebier]: choroba: another chapter of "Learning English At The Monastry"?
[shmem]: Corion, well then... next issue, sequence number not a shared resource :P
[Discipulus]: shmem i'm searching it.. but failing i was sure was in Re: Let's Make PerlMonks Great Again! -- suggestions and dreams
erix recommends Vanished Kingdoms
[Corion]: shmem: Yeah, something like that. Not that that would be a solved issue. Simply process all events that come in from a single interface sequentially. Ah well.
[Discipulus]: their

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2017-05-23 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?