As shmem guided read the document of s///g. Hope you are trying for this
#!/usr/bin/perl use strict; use warnings; open (FILE,"test.txt"); my $total=0; while (<FILE>) { $total=$total+s/>/>/g; } print $total;
GIVE A MAN A FISH.
In reply to Re: Counting no of '>' symbol in a file
by ravi45722
in thread Counting no of '>' symbol in a file
by GSperlbio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |