in reply to Find part of string
Well, one way to do it might be as follows:
while (<DATA>) { chomp; if (/_theWord/) { print "$_ contains '_theWord'\n"; } } __DATA__ ac_dajhta_theWord sd_dfdfe_fdfdv ca_hereeds_theWord se_dcvdfdef_dsfd cx_hserj_theWord fa_dferefvdvv_fadfde
However, I'm sure others might come up with better regex's to use.
|
---|
In Section
Seekers of Perl Wisdom