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]