Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

diotalevi's scratchpad

by diotalevi (Canon)
on Jun 01, 2004 at 19:39 UTC ( #358464=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
    ...
            }
        }
    }
    
  2. or download this
    #!/opt/perl-5.10.0/bin/perl                                           
    +                                                                     
    +                                
    use strict;
    use warnings;
    ...
    
        say "${width}x$width\n$table";
    }
    
  3. or download this
    . 1x2 1x3 1x4 1x5 1x6 1x7 1x8 1x9 1x10 1x11  1x12  1x13  1x14  1x15 
    . .   2x3 2x4 2x5 2x6 2x7 2x8 2x9 2x10 2x11  2x12  2x13  2x14  2x15 
    . .   .   3x4 3x5 3x6 3x7 3x8 3x9 3x10 3x11  3x12  3x13  3x14  3x15 
    ...
    . .   .   .   .   .   .   .   .   .    .     .     .     13x14 13x15
    . .   .   .   .   .   .   .   .   .    .     .     .     .     14x15
    . .   .   .   .   .   .   .   .   .    .     .     .     .     .    
    
  4. or download this
    sub EVAL {
        my ( $try, $catch ) = @_;
        
    ...
        return unless $catch;
        $catch->( $e );
    }
    
  5. or download this
    Welcome to SWI-Prolog (Multi-threaded, Version 5.6.14)
    Copyright (c) 1990-2006 University of Amsterdam.
    SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
    ...
    % ... 1,000,000 ............ 10,000,000 years later
    %
    %       >> 42 << (last release gives the question)
    
  6. or download this
    package pragma;
    use strict;
    use warnings;
    ...
    }
    
    1;
    
  7. or download this
    use strict;
    use warnings;
    use constant CHROMOSOMES => 30;
    ...
        }
        return $chromosome;
    }
    
  8. or download this
    INIT {
        # Print the code before __DATA__ and pretend nothing happened...
        if ( defined fileno *main::DATA ) {
    ...
            };
        }
    }
    
  9. or download this
    while(<DATA>) {
        print lc;
    }
    ...
    KERMIT    MISS_PIGGY    Mar  3 2005  6:34AM    985    22546    -496.36
    KERMIT    MISS_PIGGY    Mar  3 2005  6:34AM    1003    22547    -841.1
    +7
    KERMIT    MISS_PIGGY    Mar  9 2005  9:56AM    1005    22745    -110.5
    +3
    
  10. or download this
    (defun perl-other-buffer (script)
      (interactive "bProgram:")
      (let ((script-file (make-temp-file "perl-other-buffer")))
    ...
            (concat "perl -x " (shell-quote-argument script-file))))))
          (delete-file script-file)
          ok)))
    
  11. or download this
          use strict;
          use WWW::Mechanize;
          
    ...
    
       |  
       >  print $content;
    
  12. or download this
    (defun b-xref ()
      (interactive)
      (fundamental-mode)
    ...
                     (nconc lines (list line))))
                 (push (cons key (list line)) xref-output)))))))
         (sort xref-output 'b-xref-alist->)))))
    
  13. or download this
    use Regexp::Common 'number';
    my $NUMBER = "(?x:
        \\( \\$?    (?: $RE{num}{real}
    ...
                      | $RE{num}{real}{-sep => ','}{-group => 3}
                      | $RE{num}{int} {-sep => ','}{-group => 3} )
    )";
    
  14. or download this
    ### Installing the multi-method hook.
    *$method_name = sub {
        my ($self) = shift;
    ...
            return join( " ", @results );
        }
    }';
    
  15. or download this
    sub ideal
        # Everything must be declared before use or at definition
    ...
            $accumulator .= $obj->do_something( $_ )
    
        return $result
    
  16. or download this
    use IO::Socket;
    
    my $ticker = IO::Socket::INET->new( PeerAddr => 'web6...',
    ...
            s/\\\n/\n/g;
        }
    }
    
  17. or download this
    CX=0
      package=BAR
      filename=aaa.pl
    ...
      is_require=undef
      hints=0
      bitmask=\000\000\000\000\000\000\000\000\000\000\000\000
    
  18. or download this
    package BAR;
    use bbb;
    
  19. or download this
    package bbb;
    use strict;
    use warnings;
    ...
    }
    
    1;
    
  20. or download this
    package Text::Table::Squish;
    use strict;
    use warnings;
    ...
    =back
    
    =cut
    
  21. or download this
    /* Comfortable editing regions */
    textarea { width: 100%; height: 25em; }
    ...
    .diff_match {
        font-family: monospace;
    }
    
  22. or download this
    #!/usr/bin/perl
    main( @ARGV );
    exit;
    ...
          split /[\r\n]+/,
          `ps -U $user -o pid=,ppid=,s=,comm= --sort=pid,ppid` ];
    }
    
  23. or download this
    #!/home/josh/perl5.8.3/bin/perl use strict;
    use warnings;
    use DBI;
    ...
                         [ qw[CITY         city] ] ] );
    
    match( qw[HOUSE_NUMBER ==] );
    
  24. or download this
    my $keys = '('
               . join( '|',
    ...
               . ')';
    my %matches = $input =~ 
    /$keys.+?\e\[[\d;]*m\s*(\d+)/sig;
    
  25. or download this
    library(RODBC)
    
    pm <- odbcConnect("perlmonks")
    ...
    EXTRACT('dow' FROM createtime::date) = 6 AND EXTRACT('year' 
    FROM createtime) = 2004 GROUP BY createtime::date) AS o"))
    boxplot(nodes_all)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-09-17 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (55 votes), past polls