i want to search for a ".c" file or ".h" file in a dir.so, i just took an example. this piece of code is giving unexpected output can you tell where it is going wrong
$tu ="D:\\vroom\\diags\\in\\frameworks\\my_ip\\shock.h"; print "res:\t$res\n" if $res=$tu=~ m/$.c/g; print "res:\t$res\n" if $mes=$tu=~ m/$.h/g;
this pice of code returning true for even the first case. it is just searching for "c" not ".c". what should i do to make it search for ".c". where can i check wether i received an answer to my post ?
$tu ="D:\\vroom\\diags\\in\\frameworks\\my_ip\\shock.h"; if ($mes=$tu=~ m/$.h/g) { open FH, $tu or die "cannot open D:\\vroom\\diags\\in\\frameworks\ +\my_ip\\shock.h :$!\n"; while ( my $line = <FH>) { $line =~ s/\\t/ /g; } close (FH) or die "cannot close D:\\vroom\\diags\\in\\frameworks\\my_i +p\\shock.h:$!\n"; } else { print "out of loop\n"; }
Above code snippet is not substituting \t(tab) with four space. what should i do achieve it ? How do i get intimated wether i received an answer to my post ?????? THANKS,
In reply to Re^2: recursive searching in directories
by bluetooth
in thread recursive searching in directories
by bluetooth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |