in reply to
pattern matching in array
Simple one liner for the same.
perl -e 'my @ar = qw( adf "afaf faf ff" af "abf"); $_ =~ m/^\".+$/ &&
+print "Yes=",$_,"\n" foreach(@ar);'
You don't need to escape the quote, nor gobble up the entire string. Simply: m/^"/
now i am trying to work to find words starting with "" in array and I am doing this
but it is not working , @foo_d always holds 1
Non-existent; I don't have TV
Non-existent; my TV doesn't have/need a remote
Under my control; I watch alone
Under the control of whoever shouts loudest
Under the control of whoever gets it first
One of many, and the TV has a mind of its own
Results (583 votes),