Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

pvaldes's scratchpad

by pvaldes (Chaplain)
on Aug 12, 2011 at 11:48 UTC ( #920018=scratchpad: print w/replies, xml ) Need Help??

#--------------------------------------- use strict; use warnings; use diagnostics; use Benchmark qw(:all); my $var; cmpthese(1000000, { test1 => 'use Fcntl; sysopen (my $filea, "afile.jpg", O_RDONLY); sysread $filea, $var, 500;', test2 => 'open (my $fileb, "afile.jpg"); read $fileb, $var, 500;', } ) #--------------------------------------------

Find, delete and copy empty dirs and dirs with only empty subdirs

#!/usr/bin/perl use File::Find; finddepth (\&empdir, ($ARGV[0] || '.')); sub empdir { return unless -d; rmdir($_); mkdir "/tmp/$_"; # adicionalmente copiamos a temp para ver qué se +ha borrado } #--------------------------------------------
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 about the Monastery: (6)
As of 2017-07-23 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (347 votes). Check out past polls.