Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-06-28 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (624 votes). Check out past polls.