Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

delirium's scratchpad

by delirium (Chaplain)
on Jun 01, 2004 at 23:28 UTC ( [id://358804]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    Cells with commas,"test 1a,1b","test, 2a 2b"
    Cells with quotes,"test ""one""","""test"" two"
    Quotes and commas,"test ""1a,1b""","""test 2a,""2b"
    
  2. or download this
    sub handle_edi    {
        my ($bank_name, $bu, $amt);
    ...
        }
        close INFILE;
    }
    
  3. or download this
    my %sc = qw ( \\* b / em _ u );
    my %counts;
    ...
        for my $elem ( grep !/^</, @elems )  { $elem =~ s#$_#&track#eg for
    + keys %sc; }
        join '',@elems;
    }
    
  4. or download this
    $YYYYMMDD = 19000100+sprintf"%02d"x3,(localtime)[5,4,3];
    
  5. or download this
    find .|perl -lne'$t{19000100+sprintf"%02d"x3,(localtime((stat)[9]))[5,
    +4,3]}+=-s if!-d}{print"$_ $t{$_}"for sort keys%t'
    
  6. or download this
    #!/usr/bin/perl
    while(1) {
    ...
        else { last if !defined (($_ = <>) =~ s!\n|$/!!g); }
        print "$_\n";
    }
    
  7. or download this
    $_="123
    456
    789
    147,258,369,159,357";$p=X;sub d{/.{12}/s;print$&.$p;die$_ for@_}
    n:d;$m=<>until$m=~/\d/&&s/$&/$p/g;/$p{3}/?d$p:!/\d/?d"Tie":$p=~y/XO/OX
    +/;goto 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 about the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found