in reply to Re: Count number of characters in a DATA block
in thread Count number of characters in a DATA block
Many will not understand the perlsecret, Goatse; those that do may wish they didn't. All you really need is:
$PipeCounter = y/|/|/;
See also perlfaq4 How can I count the number of occurrences of a substring within a string? - which politely avoids the word goatse by creatively describing the code, without evoking a hard-to-forget mental picture, as a global match in list context ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Count number of characters in a DATA block
by kcott (Archbishop) on Sep 05, 2022 at 15:04 UTC |