hi, i have written a small script which searches for .c or .h file in a folder and searches for "tab space" and sustitute with 4 spaces, it din't work. can u tell where am i going wrong.?
$tu ="D:\\PERL\\crc_test\\shock_api.h"; print "match:$&\n" if $res=$tu=~ m/\.c$/ ; print "match:$&\n" if $mes=$tu=~ m/\.h$/ ; if ($mes=$tu=~ m/\.h$/ or $res=$tu=~ m/\.c$/) { open FH, $tu or die "cannot open the required file :$!\n"; while ( my $line = <FH>) { $line =~ s/\\t/ /g; } close (FH) or die "cannnot close the required file:$!\n"; } else { print "out of loop\n"; }
In reply to substitute 4 spaces instead of a tab by bluetooth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |