Output:#!/usr/bin/perl use strict; use warnings; while (<DATA>) { if ( /do_add/ ) { print "Wow! Got do_add - $_"; } else { print "Awwww - no do_add - $_"; } } __DATA__ do_taxes do_things do_add do_wop
C:\Perl>perl testdo.pl Awwww - no do_add - do_taxes Awwww - no do_add - do_things Wow! Got do_add - do_add Awwww - no do_add - do_wop
In reply to Re^3: Regexp for word with underscore in the middle
by Transient
in thread Regexp for word with underscore in the middle
by klaun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |