Date: Sat, 22 Sep 2001 20:33:25 GMT From: Tony Curtis Subject: Re: extra newline in s command Message-Id: <87y9n7aru0.fsf@timmy.houston.rr.com> >> On Sat, 22 Sep 2001 17:23:40 GMT, >> laura_fairhead@my-deja.com (laura fairhead) said: > Hi, Can anyone explain to me why I'm getting extra > newlines inserted with the s/// command in this script; > open(FILE,qq[patternfile]) > @k=(qq[0000],) > while(<>){ > /(\d{4})/&& $1<=$#k && s/$1/$k[$1]/ > print > } This code doesn't even compile. Please post the *real* code and try again. How can you expect useful advice if you post something that is unrelated to your problems?