#!/usr/bin/perl # http://perlmonks.org/?node_id=1190410 use strict; use warnings; my $input = <<END; | | | | | | | | ! ! first line \t\tsecond line \t\t\tthird line \tfourth line \t\tfifth line \t\tline with\t\tin the middle last line END open my $fh, '<', \$input or die "$! opening file"; while(<$fh>) { s/\G\t/ /g; print; }
In reply to Re: Replace multiple tabs with spaces at start of a string
by tybalt89
in thread Replace multiple tabs with spaces at start of a string
by mavericknik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |