Help for this page

Select Code to Download


  1. or download this
    
     if ( &testA || &testB ) { print "IF\n" ;}
     sub testA { print "AAA\n" ; return( 1 ) ;}
     sub testB { print "BBB\n" ; return( 1 ) ;}
    
  2. or download this
      if ( -s $file || $file =~ /\.new$/ || $file eq 'foo ') { ;}
    
  3. or download this
      use B::Deparse;
      
    ...
        print "aaa \" $var bbb\n" ;
        return( 'foo' ) ;
      }
    
  4. or download this
      $var = "foo" ;
      $var = "$var,bar" ;
    
  5. or download this
      $var = "foo" ;
      $var .= ",bar" ;
    
  6. or download this
      $var += 10 ; # for $var = $var + 10 ;
      $var -= 10 ; # for $var = $var - 10 ;
      $var /= 10 ; # ...
      $var *= 10 ; # ...
    
  7. or download this
      $var = "foo$var" ;
    
  8. or download this
     substr($var,0,0) = "foo" ;
    
  9. or download this
      while(1){
        my $var = &foo() ;
        ...
      }
    
  10. or download this
      my $var ;
      while(1){
        $var = &foo() ;
        ...
      }
    
  11. or download this
    $data = 'foo' x (1024*1024) ;
    &test(\$data) ;
    ...
      my ( $datarf ) = @_ ;  
      if ( $$datarf =~ /foo/s ) { print "bar\n" ;}
    };
    
  12. or download this
     $rf_s = \$scalar ;
     $rf_a = \@array ;
     $rf_h = \%hash ;
    
  13. or download this
     $$rf_s .= 'foo' ;
    
    ...
       my $Value = $$rf_h{$Key} ;
       print "$Key = $Value\n" ;
     }
    
  14. or download this
      open (FLHD,"$0") ;
      my $fl_data = join('' , <FLHD>) ;
    
  15. or download this
      open (FLHD,"$0") ;
      my $fl_data ;
      1 while( sysread(FLHD, $fl_data , 1024*8 , length($fl_data) ) ) ;
    
  16. or download this
      open (FLHD,"$0") ;
      while (my $line = <FLHD>) {
        my ($x , $y , $z) = split("::" , $line) ;
      }
    
  17. or download this
      $foo = '123' ;
      $bar = undef ;
    ...
      
      $bar = 102030 ;
      print "foo: $foo\n" ;
    
  18. or download this
      # To have $bar , @bar and %bar from *foo ;
      *bar = \$foo ;
    ...
      
      # For packages:
      *bar:: = *foo:: ; # you have now main::bar linked to main::foo
    
  19. or download this
    ENGLISH
      Nothing that was will be
    ...
      Há tanta vida lá fora,
      Aqui dentro, sempre,
      Como uma onda no mar.