Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Neighbour's scratchpad

by Neighbour (Friar)
on Nov 11, 2009 at 12:57 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found