#!/usr/bin/perl # Fig. 5.4: fig05_04.pl # Demonstrating map and grep. @numbers = ( 1 .. 10 ); print "\@numbers: @numbers\n\n…
PL-2313 源代码
汇集 PL-2313 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
#!/usr/bin/perl # Fig. 5.9: fig05_09.pl # Using the redo statement in a while structure. $number = 1; while ( $number
#!/usr/bin/perl # Fig. 5.16: fig05_16.pl # Using logical operators in flow control. print "Please enter a numerator: "; chom…
#!/usr/bin/perl # Fig. 5.11: fig05_11.pl # Using block labels with next in nested looping structures. OUTER: foreach $row ( 1…
#!/usr/bin/perl # Fig. 5.7: fig05_07.pl # Using the next statement in a foreach structure. foreach ( 1 .. 10 ) { if ( $…
#!/usr/bin/perl # Figure 13.5: fig13_05.pl # Anonymous arrays and hashes use warnings; use strict; my $array = [ qw( Ther…
#!/usr/bin/perl # Figure 13.8: fig13_08.pl # A simple closure example use warnings; use strict; sub animalInFood { m…
#!/usr/bin/perl # Figure 13.12: fig13_12.pl # Shows how to use two dimensional arrays. use warnings; use strict; my @arra…
#!/usr/bin/perl # Figure 13.1: fig13_01.pl # Demonstrates creating and dereferencing a reference. use strict; use warnings; …
#!/usr/bin/perl # Figure 13.2: fig13_02.pl # Demonstrates how to use references to arrays and hashes. use strict; use warnin…