Use of my on left side breaks STDIN on right side?

2009-03-29 Thread Kelly Jones
> perl -le '$x=; print $x' hello <- I TYPED THIS IN AND HIT RETURN hello > perl -le 'my($x)=; print $x' hello <- I TYPED THIS IN AND HIT RETURN [no answer, hangs forever] Why? -- We're just a Bunch Of Regular Guys, a collective group that's trying to understand and assimilate technology. We fee

Re: Use of my on left side breaks STDIN on right side?

2009-03-29 Thread John W. Krahn
Kelly Jones wrote: perl -le '$x=; print $x' hello <- I TYPED THIS IN AND HIT RETURN hello perl -le 'my($x)=; print $x' hello <- I TYPED THIS IN AND HIT RETURN [no answer, hangs forever] $x= is in scalar context so only one line is read. ($x)= is in list context so readline keeps reading ut

Re: Use of my on left side breaks STDIN on right side?

2009-03-29 Thread Chas. Owens
On Sun, Mar 29, 2009 at 22:20, John W. Krahn wrote: > Kelly Jones wrote: >>> >>> perl -le '$x=; print $x' >> >> hello <- I TYPED THIS IN AND HIT RETURN >> hello >> >>> perl -le 'my($x)=; print $x' >> >> hello <- I TYPED THIS IN AND HIT RETURN >> [no answer, hangs forever] > > $x= is in scalar cont

Accepting terminal input with pre-loaded editable value

2009-03-29 Thread Chap Harrison
This may be beyond the beginner level I don't know. I'd like to prompt the user to type in a City, State, and Zip in one line. It's free-form, in that it's just for display, but I can make a pretty decent "suggestion" based upon data I've previously gathered. If I've gathered "IN-NewD