<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>


                    ??????? Perl5?е?????/???

                    ??????ü??
                    ???????????
                    ??????÷?б??(\)??????
                    ??????ú?????
                    ?塢???????
                    ??????????????
                      ????????
                    ??????????????
                    ???????????????

                    ??????ü??
                        ???t?????????????????????顢????????й??????飩?????????Pascal??C?????????????????????????????????t?????????????????????????????????????漲????Perl?У?????????ó????????????????????????????????????????????????á?
                        Perl5?е??????????????????ú???????á????????ú??б?????????????????????????????????λ?????????????????????t??????????UNIX???е?????????????????????????е???????
                        Perl4??????????????????????Щ????????磬??????????????????????????????_main{}????????????Perl5?????????????????????????
                        ??????????????????????????????Perl???????????????????????????????????????????????С?Perl????????????????????????Perl?е??κζ??????????????????????????????á?
                        ????????????ú????????????????????????????????????ò?????????????????????? ??Perl?е?????????????
                    ???????????
                        ?????У??????????$pointer???????????$pointer???????????????????????????????????
                        ?κμ????????????????á???????????????ж????????????????????????????????????????????????????顢?????????顢?????????????????????????????ü?????????????????????????????????????????????á?
                        ?????????Щ???????
                        ???$pointer???????????????????????@$pointer???????????е????????@$pointer????????????$pointer?е??????????????á?????????%$pointer?????????е???????????á?
                        ?ж??????????????????????????κ??????????????????顢????????????????????????--C?????????????--???á?Perl?????????д?????????????????臨??????:)
                        ???濴??Perl?д??????????????????
                    ??????÷?б??(\)??????
                        ??б?????????C?????д????????????&????????????????\??????????????μ????á????????????????????????????
                        $variavle = 22;
                        $pointer = \$variable;
                        $ice = "jello";
                        $iceprt = \$ice;
                        ????$pointer??????$variable???λ???????$iceptr???"jello"??????????????$variable?????????????????$pointer??????????????????????????????????$pointer??$variable???????????????С?
                        ????????????У????????$pointer?????$variable?????????????????????????????????$????????£?
                    #!/usr/bin/perl
                    $value = 10;
                    $pointer = \$value;
                    printf "\n Pointer Address $pointer of $value \n";
                    printf "\n What Pointer *($pointer) points to $$pointer\n";
                        ?????????£?
                    Pointer Address SCALAR(0x806c520) of 10
                    What Pointer *(SCALAR(0x806c520)) points to 10
                        ??????У????????е?????????????????????$pointer???????????$$pointer????$variable?????
                        ????μ?????????SCALAR???????????????SCALAR???????????????????????????????????????????????????
                        ??????????????????????????????????????????????????????Ч??????????????????????????????£?Perl????NULL???????????????????????????а????е????????????????????Ч???????䶮
                    ??????ú?????
                        ????Perl??????ü????????????????????Perl?е????????????????????????????????????????????????????????????????????????????????????????????????????????á?
                        ???????????????????????????÷?б?????????????????????£?
                    1  #!/usr/bin/perl
                    2  #
                    3  # Using Array references
                    4  #
                    5  $pointer = \@ARGV;
                    6  printf "\n Pointer Address of ARGV = $pointer\n";
                    7  $i = scalar(@$pointer);
                    8  printf "\n Number of arguments : $i \n";
                    9  $i = 0;
                    10 foreach (@$pointer) {
                    11   printf "$i : $$pointer[$i++]; \n";
                    12 }
                        ???н?????£?
                    $ test 1 2 3 4
                    Pointer Address of ARGV = ARRAY(0x806c378)
                    Number of arguments : 4
                    0 : 1;
                    1 : 2;
                    2 : 3;
                    3 : 4;     ??5?н?????$pointer???????@ARGV????6?????ARGV??????$pointer????????????????????????C?????е??????????????????7?е??ú???scalar()?????????????????ò???????@ARGV????????????????@$pointer??????????????????飬$pointer?????????@??????????????????????????????????10?????7?????????11???????$$pointer[$i]?г?????????
                        ???????????÷?б???????????????????--?????й?????????????????$poniter???????????????????????????????????????????--ARRAY??SCALAR???????????????飩???????????????HASH??CODE???????????????????????
                    #!/usr/bin/perl
                    1  #
                    2  # Using Associative Array references
                    3  #
                    4  %month = (
                    5   '01', 'Jan',
                    6   '02', 'Feb',
                    7   '03', 'Mar',
                    8   '04', 'Apr',
                    9   '05', 'May',
                    10  '06', 'Jun',
                    11  '07', 'Jul',
                    12  '08', 'Aug',
                    13  '09', 'Sep',
                    14  '10', 'Oct',
                    15  '11', 'Nov',
                    16  '12', 'Dec',
                    17  );
                    18
                    19 $pointer = \%month;
                    20
                    21 printf "\n Address of hash = $pointer\n ";
                    22
                    23 #
                    24 # The following lines would be used to print out the
                    25 # contents of the associative array if %month was used.
                    26 #
                    27 # foreach $i (sort keys %month) {
                    28 # printf "\n $i $$pointer{$i} ";
                    29 # }
                    30
                    31 #
                    32 # The reference to the associative array via $pointer
                    33 #
                    34 foreach $i (sort keys %$pointer) {
                    35   printf "$i is $$pointer{$i} \n";
                    36 }
                        ?????????£?
                    $ mth
                    Address of hash = HASH(0x806c52c)
                    01 is Jan
                    02 is Feb
                    03 is Mar
                    04 is Apr
                    05 is May
                    06 is Jun
                    07 is Jul
                    08 is Aug
                    09 is Sep
                    10 is Oct
                    11 is Nov
                    12 is Dec
                        ?????????????????÷???????????????$$pointer{$index}???????$index???????????????????????????м???????????????????????????????=>????????????????Щ?????????????????
                    1  #!/usr/bin/perl
                    2  #
                    3  # Using Array references
                    4  #
                    5  %weekday = (
                    6    '01' => 'Mon',
                    7    '02' => 'Tue',
                    8    '03' => 'Wed',
                    9    '04' => 'Thu',
                    10   '05' => 'Fri',
                    11   '06' => 'Sat',
                    12   '07' => 'Sun',
                    13   );
                    14 $pointer = \%weekday;
                    15 $i = '05';
                    16 printf "\n ================== start test ================= \n";
                    17 #
                    18 # These next two lines should show an output
                    19 #
                    20   printf '$$pointer{$i} is ';
                    21   printf "$$pointer{$i} \n";
                    22   printf '${$pointer}{$i} is ';
                    23   printf "${$pointer}{$i} \n";
                    24   printf '$pointer->{$i} is ';
                    25
                    26   printf "$pointer->{$i}\n";
                    27 #
                    28 # These next two lines should not show anything 29 #
                    30   printf '${$pointer{$i}} is ';
                    31   printf "${$pointer{$i}} \n";
                    32   printf '${$pointer->{$i}} is ';
                    33   printf "${$pointer->{$i}}";
                    34 printf "\n ================== end of test ================= \n";
                    35
                        ?????????£?
                    ================== start test =================
                    $$pointer{$i} is Fri
                    ${$pointer}{$i} is Fri
                    $pointer->{$i} is Fri
                    ${$pointer{$i}} is
                    ${$pointer->{$i}} is
                    ================== end of test =================
                        ???????????????????????????????????????????????С?????????????????????????????????Perl?У??в????????????print?????????????£???????????Perl??????????????????
                    ?塢???????
                        ???@array = list;?????????????????????????????????????????á??????????????????????????????
                        $line = ['solid' , 'black' , ['1','2','3'] , ['4','5','6']];
                        ????佨??????????????????????飬????$line???????顣???????????????????????????????????????????????????????????????????????????????????????????£?
                    $arrayReference->[$index]     single-dimensional array
                    $arrayReference->[$index1][$index2]   two-dimensional array
                    $arrayReference->[$index1][$index2][$index3] three-dimensional array
                        ?????????????????????????????????????????????????????????????????????????????????????Щ--??????????Щ????????棬??????????????????????????Perl??????????????????д??????????????????:)
                        ???飺??????????????????????????????????????????????????
                        ??????????????????????????
                    1  #!/usr/bin/perl
                    2  #
                    3  # Using Multi-dimensional Array references
                    4  #
                    5  $line = ['solid', 'black', ['1','2','3'] , ['4', '5', '6']];
                    6  print "\$line->[0] = $line->[0] \n";
                    7  print "\$line->[1] = $line->[1] \n";
                    8  print "\$line->[2][0] = $line->[2][0] \n";
                    9  print "\$line->[2][1] = $line->[2][1] \n";
                    10 print "\$line->[2][2] = $line->[2][2] \n";
                    11 print "\$line->[3][0] = $line->[3][0] \n";
                    12 print "\$line->[3][1] = $line->[3][1] \n";
                    13 print "\$line->[3][2] = $line->[3][2] \n";
                    14 print "\n"; # The obligatory output beautifier.
                        ?????????£?
                    $line->[0] = solid
                    $line->[1] = black
                    $line->[2][0] = 1
                    $line->[2][1] = 2
                    $line->[2][2] = 3
                    $line->[3][0] = 4
                    $line->[3][1] = 5
                    $line->[3][2] = 6
                        ????????????????????????????????????汾??
                    1  #!/usr/bin/perl
                    2  #
                    3  # Using Multi-dimensional Array references again
                    4  #
                    5  $line = ['solid', 'black', ['1','2','3', ['4', '5', '6']]];
                    6  print "\$line->[0] = $line->[0] \n";
                    7  print "\$line->[1] = $line->[1] \n";
                    8  print "\$line->[2][0] = $line->[2][0] \n";
                    9  print "\$line->[2][1] = $line->[2][1] \n";
                    10 print "\$line->[2][2] = $line->[2][2] \n";
                    11 print "\$line->[2][3][0] = $line->[2][3][0] \n";
                    12 print "\$line->[2][3][1] = $line->[2][3][1] \n";
                    13 print "\$line->[2][3][2] = $line->[2][3][2] \n";
                    14 print "\n";
                        ?????????£?
                    $line->[0] = solid
                    $line->[1] = black
                    $line->[2][0] = 1
                    $line->[2][1] = 2
                    $line->[2][2] = 3
                    $line->[2][3][0] = 4
                    $line->[2][3][1] = 5
                    $line->[2][3][2] = 6
                        ???????????????????$line->[2][3][0]????????C?????е?Array_pointer[2][3][0]???????У??±??????????????????????檔???????????????????????????????????????????£?
                    1 #!/usr/bin/perl
                    2 #
                    3 # Using Multi-dimensional Array and Hash references
                    4 #
                    5 %cube = (
                    6 '0', ['0', '0', '0'],
                    7 '1', ['0', '0', '1'],
                    8 '2', ['0', '1', '0'],
                    9 '3', ['0', '1', '1'],
                    10 '4', ['1', '0', '0'],
                    11 '5', ['1', '0', '1'],
                    12 '6', ['1', '1', '0'],
                    13 '7', ['1', '1', '1']
                    14 );
                    15 $pointer = \%cube;
                    16 print "\n Da Cube \n";
                    17 foreach $i (sort keys %$pointer) {
                    18 $list = $$pointer{$i};
                    19 $x = $list->[0];
                    20 $y = $list->[1];
                    21 $z = $list->[2];
                    22 printf " Point $i = $x,$y,$z \n";
                    23 }
                        ?????????£?
                    Da Cube
                    Point 0 = 0,0,0
                    Point 1 = 0,0,1
                    Point 2 = 0,1,0
                    Point 3 = 0,1,1
                    Point 4 = 1,0,0
                    Point 5 = 1,0,1
                    Point 6 = 1,1,0
                    Point 7 = 1,1,1
                        ???????????????????????%cube?б??????????????????????????????????顣????$list?????????????????$list = $$ pointer{$i}; ??????????????$x = $list->[0]; ... ????????·?????$x??$y??$z?????($x,$y,$z) = @$list;
                        ??ù??????????????$????->?????????????????????????????Ч??
                        $$names[0] = "kamran";
                        $names->[0] = "kamran";
                        ?????????????????????Ч??
                        $$lastnames{"kamran"} = "Husain";
                        $lastnames->{"kamran"} = "Husain";
                        Perl?е???????????????д?????????????????????????????????????????????????????????????????????????????????????????contours???????????????
                        $contours[$x][$y][$z] = &xlate($mouseX, $mouseY);
                    ??????????????
                        perl??????????????C?к??????????????????????£?
                        $pointer_to_sub = sub {... declaration of sub ...};
                        ?????????????????????????????
                        &$pointer_to_sub(parameters);
                  1. ????????

                  2.     ?????????????????????????????????????????á???????????????????У????????????????????????????????????Perl??Closure??????????????Closure?????????????????????????????????????????С?(Closure???OOP??ο???)??????????У????????????????????????????????????巽?????????????塣
                    #!/usr/bin/perl
                    sub errorMsg {
                      my $lvl = shift;
                      #
                      # define the subroutine to run when called.
                      #
                      return sub {
                        my $msg = shift; # Define the error type now.
                        print "Err Level $lvl:$msg\n"; }; # print later.
                      }
                    $severe = errorMsg("Severe");
                    $fatal = errorMsg("Fatal");
                    $annoy = errorMsg("Annoying");

                    &$severe("Divide by zero");
                    &$fatal("Did you forget to use a semi-colon?");
                    &$annoy("Uninitialized variable in use");
                        ?????????£?
                    Err Level Severe:Divide by zero
                    Err Level Fatal:Did you forget to use a semi-colon?
                    Err Level Annoying:Uninitialized variable in use
                        ?????У??????errorMsg???????????$lvl???????????????????errorMsg?????????$lvl???????????????????????У?????????my?????????ε??????????????????$lvl?????????errorMsg???????$lvl??????浽??α???????????????????????С??????????????????????y??е????$msg??????滻????$lvl??????????????????????????
                        ????????????????????????????Perl?????к??????
                    ??????????????
                        ????????????????????????????????????????????顣????????????@_???????????????????@_???????????飬?????????????????????飬???????????@_?У?????????my(@a,@b)=@_; ??????????????????????????????@a????@b???????????????????????鴫??????????????????????á?????????
                    #!/usr/bin/perl
                    @names = (mickey, goofy, daffy );
                    @phones = (5551234, 5554321, 666 );
                    $i = 0;
                    sub listem {
                      my ($a,$b) = @_;
                      foreach (@$a) {
                        print "a[$i] = " . @$a[$i] . " " . "\tb[$i] = " . @$b[$i] ."\n";
                        $i++;
                      }
                    }
                    &listem(\@names, \@phones);
                        ?????????£?
                    a[0] = mickey     b[0] = 5551234
                    a[1] = goofy      b[1] = 5554321
                    a[2] = daffy      b[2] = 666
                    
                    ???
                    1???????????????????????????????????????????á?
                    2???????????????????????? (@variable)=@_; ????????????????????????в??????е?????????????С?
                    ???????????????
                        ????????????????????????????????磬?????????????????????????????????????????????????????????????????????????????????????????????????д?????????????????и????????????£?
                        spitOut(\*STDIN);
                        spitOut(\*LPHANDLE);
                        spitOut(\*LOGHANDLE);
                        ?????????spitOut????????£?
                    sub spitOut {
                      my $fh = shift;
                      print $fh "Gee Wilbur, I like this lettuce\n";
                    }
                        ?????????????????????\*FILEHANDLE??

                    ????? ????? ??


                    paper | appdir | ssv

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频