My question is "why would you want to do this?". I can think of no compelling reason. You've already read the entire DATA into @end. The DATA section cannot change (as far as I know). So why read it again?
-- Mike Arms > -----Original Message----- > From: Jan De Ryck [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 4:46 PM > To: [EMAIL PROTECTED] > Subject: reading from DATA twice > > > I have the following program: > > @end = <DATA>; > > print @end; > #seek DATA, 0, 0; > @end = <DATA>; > > print @end; > > __END__ > A=0 > B=1 > C=2 > D=3 > > I expect this to print: > A=0 > B=1 > C=2 > D=3 > A=0 > B=1 > C=2 > D=3 > > Instead it prints only the first 4 lines > If I uncomment the seek statement it prints the first 4 lines, > followed by the contents of the entire file, from the beginning. > Is this normal behavior, and if so why? > ====================================================================== > /Jan DE RYCK, Systems Engineer > College of Business Administration, University of Hawaii at Manoa > ph. (808)956-3673 fax. (808)956-2915 > e-mail: [EMAIL PROTECTED] > ====================================================================== _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
