in reply to Re^3: perl system command
in thread perl system command

thank you , I learned from your example. I wanted to extract just the word "feed", I was using my $result=$row=~/feed*/m but $result would just contain 0 or 1 which I read is expected, but your way gets the phrase.Thank you , but what does /^_*$/ do? You are saying you are searching for underscore at the front, followed by anything at the end? and what does the brackets [] do? Thank you

Replies are listed 'Best First'.
Re^5: perl system command
by hippo (Archbishop) on Nov 10, 2016 at 16:56 UTC

    The square brackets indicate a character class and the caret inside negates what follows such that [^_] means any character other than an underscore. The dollar anchors it to the end. All this is in perlre and related pages which are well worth a read.