in reply to Counting no of '>' symbol in a file
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.
|
|---|