Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

nite_man's scratchpad

by nite_man (Deacon)
on Jun 03, 2004 at 09:51 UTC ( [id://360017]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use POSIX 'strftime';
    
    my $today = strftime '%d/%m/%Y %H:%M', localtime;
    $today =~ s!(\d{2})/(\d{2})/(\d{4})!$3-$2-$1!;
    
  2. or download this
    my @array = ('One', 'Two', 'Three', 'Four', 'Five');
    
    ...
    
    print get_element_index('Four', @array); # Res: 3
    print get_element_index('Six', @array); # Res: -1
    
  3. or download this
    use constant TEST => 'test';
    
    ...
    
    if($var =~ qr{${\TEST}}) { print 'OK!' }
    else { print 'Not matched!' }
    
  4. or download this
    my $var = 1;
    
    if($var =~ qr{#{\C->TEST_CONST}}) { print 'OK!' }
    else { print 'Not matched!' }
    
  5. or download this
       <a href=#top onClick='scrollTo(0,0); return false;'>
          <font color=#FFFFFF>TOP</font>
       </a>
    
  6. or download this
    my @array = (2) x 10;
    
    __DATA__
    
    [2,2,2,2,2,2,2,2,2,2]
    

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 drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-26 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found