print qq{@{[qw/I will not throw paper airplanes in class./]}\n} for 1..500; #### for ($i=0;$i<500;$i++) { printf("I will not throw paper airplanes in class.\n"); } #### my $line = ; map { print $line } 1..500; __DATA__ I will not throw paper airplanes in class. #### $line="\n.ssalc ni senalpria repap worht ton lliw I"; print join'',reverse split//,$line for 1..500; #### %x=qw/airplanes 5 class. 7 I 0 in 6 not 2 paper 4 throw 3 will 1/; print qq{@{[map {$_ ->[0]} sort{$a->[1]<=>$b->[1 ]}map{[$_, $x{$_}]}keys %x]} } for 1..length 'x' x 2 x 5 x 5 x 5 x 2; $a;$b;$c;$d;$e; #### while(){chomp,m/^(\d+)\s+(.*)/,$p[$1]=$2}{ redo if ($p[++$pc] eq undef); if($p[$pc]=~/^(?:\s)*FOR\s+(\w+)(?:\s)*=(?:\s)*(\d+)(?:\s)*TO(?:\s)*(\d+)/x){ $var{$1} = [$pc, $2, $3]; }elsif ($p[$pc] =~ /^(?:\s)*PRINT\s+'(.*)'/x){ print "$1\n"; }elsif ($p[$pc] =~ /^(?:\s)*NEXT\s+(\w+)/x){ die "variable $1 not defined!" if !$var{$1}; $var{$1}->[1]++; $pc = $var{$1}->[0] if $var{$1}->[1] <= $var{$1}->[2]; }elsif ($p[$pc] =~ /^(?:\s)*END/x){ exit(0); } redo; } __DATA__ 1 REM ****** BASIC PROGRAM ******* 2 REM *** Print Text 500 times *** 3 10 FOR I = 1 TO 500 20 PRINT 'I will not throw paper airplanes in class.' 30 NEXT I 31 32 REM ****** I CAN DO NESTED LOOP TOO ****** 33 40 FOR I = 1 TO 2 50 FOR J = 1 TO 5 60 FOR K = 1 TO 5 70 FOR L = 1 TO 10 80 PRINT 'I will not throw paper airplanes in class.' 90 NEXT L 100 NEXT K 110 NEXT J 120 NEXT I 130 END