Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Neighbour's scratchpad

by Neighbour (Friar)
on Nov 11, 2009 at 12:57 UTC ( #806481=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $data = "spamspamspamspamusefuldataspamspamspam";
    print("Data: " . (map { s/spam//g;$_; } ($data))[0] . "\n");
    
  2. or download this
    if ($expected !~~ $got) {
        print("Smartmatch failed comparing data\n");
    ...
        print("Got:\n");
        Devel::Peek::Dump $got;
    }
    
  3. or download this
    Smartmatch failed comparing data
    Expected:
    ...
      PV = 0xe0422e0 "0.00"\0
      CUR = 4
      LEN = 8
    
  4. or download this
    sub ReadXLS {
        my $ar_data;
    ...
        print(scalar @{$ar_data} . " records in [" . $benchmark->real . " 
    +seconds], [" . (scalar @{$ar_data} / $benchmark->real) . " records/s]
    +\n");
        return $ar_data;
    }
    
  5. or download this
    $Interfaces::ExcelBinary::Headers = [];
    # cell_handler (Workbook, Sheet_index, Row, Col, Cell)
    ...
        my $WorkBook    = $ExcelParser->parse($FileName);
    print("Done parsing\n");
        exit;
    
  6. or download this
    #!/usr/bin/perl
    
    use warnings;
    ...
    $text3 =~ s/(.*)(.*)(??{reverse $1})/$2/;
    
    print("Without common start [$text3]\n");
    
  7. or download this
    #!/usr/bin/perl
    
    ...
    $text2 =~ s/^\Q$common//;
    
    print "[$text1]\n[$text2]\n";
    

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 drinking their drinks and smoking their pipes about the Monastery: (21)
As of 2015-07-01 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (6 votes), past polls