Yup, sorry i highlighted it and probably pressed enter, it got deleted. what is "auto flush"?
-----Original Message----- From: Weijie Ding [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 27, 2002 4:31 PM To: Juban, Nix; 'John W. Krahn'; [EMAIL PROTECTED] Subject: Re: RE: My script doesnt print out the output i like Hi, Juban, Nix, 2002-11-27 16:26:29 I think you missed a character in your letter. The line you mentioned should be as follows: while(1) { print $e[($i %= @e) ++], "\b"; } ^^ the "%" can't be omitted. the modulo's values should be 0 to 3 and loops back again. I think as long as the number of elements of the array doesn't overflow, you can use it safely. what do you mean by "auto flush"? ======= At 2002-11-27, 15:15:00 you wrote: ======= >John, > >I would like to know if i understood this line clear. > >while (1) { print $e[ ($i = @e)++ ], "\b"; } > >so modulo's values are 0 then 1 then 2 then 0 (tehn loops back again). >This will make it loop and print the 4 values of my array. > >is this applicable for all arrays with unlimited number of elements? > >how about auto flush? what does it do? > >rgds, >nix > >-----Original Message----- >From: John W. Krahn [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, November 27, 2002 2:33 PM >To: [EMAIL PROTECTED] >Subject: Re: My script doesnt print out the output i like > > >> Nix Juban wrote: >> >> Hi! > >Hello, > >> Im just new to PERL and im trying this out...its suppose to make this >> line tumble like a cartwheel. >> >> ##!/usr/intel/bin/perl -w >> use strict; >> use warnings; >> >> my @e=qw(|\_/); >> while (1) >> { >> foreach (@e) >> { >> print $_."\b"; >> } >> } > > >#!/usr/intel/bin/perl -w >use strict; >use warnings; > >my @e = qw( | \ - / ); > >$| = 1; # turn on autoflush >my @e = qw( \ - / | ); >my $i = 0; > >while (1) { > print $e[ ($i = @e)++ ], "\b"; > } > > > >> Name: geo_clematism.gif >> geo_clematism.gif Type: GIF Image (image/gif) >> Encoding: base64 >> >> Name: Blank Bkgrd.gif >> Blank Bkgrd.gif Type: GIF Image (image/gif) >> Encoding: base64 > > >Please don't post graphics files, post text only. TIA > > > >John >-- >use Perl; >program >fulfillment > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >. ================================================ Best regards. Weijie Ding [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]