in reply to pattern matching in array
Simple one liner for the same.
Output:perl -e 'my @ar = qw( adf "afaf faf ff" af "abf"); $_ =~ m/^\".+$/ && +print "Yes=",$_,"\n" foreach(@ar);'
Yes="afaf Yes="adf"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: pattern matching in array
by hbm (Hermit) on Jun 20, 2013 at 11:36 UTC | |
by torres09 (Acolyte) on Jun 24, 2013 at 08:28 UTC |
In Section
Seekers of Perl Wisdom