Skip to main content





Playwright-Perl - George S. Baugh - TPRC 2024 submitted by /u/briandfoy
[link] [comments]


I found a script from 2008 year, that renames files to random filenames:

```

!/usr/bin/perl

randomize the filenames for the photo frame

https://www.bulkrenameutility.co.uk/forum/viewtopic.php?t=114


$dir = $ARGV[0] || die "directory?\n"; chdir($dir) || die "chdir";

opendir(D, ".") || die "opendir"; @files = grep {/jpg/} readdir(D); closedir(D);

array shuffle from perl FAQ


srand; @newfiles = (); for (@files) { my $r = rand @newfiles + 1; push(@newfiles,$newfiles[$r]); $newfiles[$r] = $_; }

if ($#files != $#newfiles) { die "$#files != $#newfiles\n"; }

while ($old = pop @files) { $new = pop @newfiles; $new =~ s/p/r/; ! -f $new || die "won't overwrite $new - check the regexp\n"; print "$old -> $new\n"; rename $old, $new || warn "rename $old -> $new: $!\n"; } ```

If I run it as perl foo.pl ./, there is won't overwrite bar.jpg - check the regexp error. And if I run it as perl fo.pl ./bar.jpg, there is chdir at foo.pl line 7 error. How to make it work?

I have Perl 5.34.1 installed.

submitted by /u/Impressive-West-5839
[link] [comments]



Abe Timmerman ABELTJE has passed away yesterday after a long fight with cancer.

A long time participant in what are now called Perl Toolchain Summits, he was co-responsible for setting up the Perl smoking infrastructure.

And was always a welcome guest at almost all YAPC::EU conferences, as well as many Dutch and Belgian Perl Workshops, and NLPM (Dutch PerlMongers) meetings.

He will be missed. R.I.P.

submitted by /u/liztormato
[link] [comments]