That would print a line saying "test" for each line containing the string "test"if($line =~ /(test)/) { print $1,"\n"; }
It's not clear from your post what you mean by "just what I'm trying to get." Would you please clarify what you are trying to do?
In reply to Re: =~ and substitutions
by tall_man
in thread =~ and substitutions
by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |