Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple question about while 1

Status
Not open for further replies.

nrich239

Programmer
Jun 9, 2004
22
US
This kinda goes along with my other post but I want to do a while loop that goes until ti finds the end date

I know in an if statement I can use =~ to see if it contains a certain piece.

What I want to know is if there is a doesn't contain, something like (!=~)??

If not, what else could I use like that?

basically I want to do something like this:

if($word =~ $begin) {
while($word !=~ $end) {
print "$word ";
}
}
 
Hi nrich,

you were nearly there ..

use !~ for 'does not match' or 'does not contain'

Thanks,
parkers
 
hi nrich239, did you already heard about 'sed'

sed -ne "/$begin/,/$end/p" inputfilename



:) guggach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top