Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

izut's scratchpad

by izut (Chaplain)
on Jun 23, 2005 at 14:28 UTC ( #469407=scratchpad: print w/ replies, xml ) Need Help??

File::Find usage:
#!/usr/bin/env perl use File::Find; find({ wanted => \&process, }, split /:/, $ENV{'PATH'}); sub process { -f && -x && $ARGV[0] eq $_ && print $File::Find::name, "\n"; }
Assignment if defined:
{ $a->{b} = $b || last }
Assignment if defined using tie:
package Tie::Hash::OnlyIf; sub STORE { my $self = shift; my ($key, $val) = @_; if ( $val ) { $self->{$key} = $val; } } package main; tie my %data, Tie::Hash::OnlyIf; $data{b} = $b;
To ultibuzz:
use strict; use warnings; use Test::More qw(no_plan); ok( "1A" =~ /[\w\d]{2,}/ ); ok( "A1" =~ /[\w\d]{2,}/ ); ok( "56429K01B" =~ /[\w\d]{2,}/ ); ok( "1132086" =~ /[\w\d]{2,}/ );
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 chanting in the Monastery: (8)
As of 2015-07-31 02:40 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 (274 votes), past polls