Note1: can also be written $count = grep /^help$/, @arr ....#!/usr/bin/perl use 5.014; my $count; my @arr = qw/helper abc help def helpless helpful whelp help/; $count = grep {/^help$/}@arr and print "This is a help message. "; +# Note1 say "\$count: $count"; # This is a help message. $count: 2
In reply to Re^3: Help required on Getopt::Long
by ww
in thread Help required on Getopt::Long
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |