- or download this
my %skip = (
'gif' => 1,
'jpg' => 1,
'jpeg' => 1,
'png' => 1
);
- or download this
my %skip_for;
@skip_for{qw( gif jpg jpeg png )} = ();
- or download this
my ($nil,$ext) = $file =~ /^(.*?)\.(.*?)$/gs; - or download this
my ($ext) = $file =~ /^.*?\.(.*?)$/gs; - or download this
my ($ext) = $file =~ /[.]([^.]+)$/gs; - or download this
#!/usr/bin/perl -w
use strict;
use Fcntl;
...
},
(@ARGV) || "." # NB: parens required
);
- or download this
sysopen FH, $_, O_RDWR
or (warn "Couldn't open $File::Find::name: $!\n", return);
s/\r//g, $content .= $_ while (
defined (sysread FH, $_, 65536)
or (warn "Couldn't open $File::Find::name: $!\n", return)
);
- or download this
return if -d or /^[.]/;
return if /[.]([^.]+)$/ and exists $skip_for{$1};